Functional Programming Principles in Scala have started ! ! !

 
Today, I just started course on Scala https://class.coursera.org/progfun-005, here is some sample and description:
“Over the next seven weeks you will explore functional programming in a sequence of lectures, quizzes, and homework assignments. We will take you from the fundamental concepts of functional programming to practical solutions for challenging programming problems. This is the fifth iteration of the course; the first one was held in fall 2012. 50’000 students enrolled in that course and almost 10’000 completed it with a certificate. In fact, the course had one of the highest completion rate of any massive open online course. ”
 
On my Github repository I will keep some snippets https://github.com/TomaszWaszczyk/Coursera/tree/master/Functional%20Programming%20Principles%20in%20Scala
 
I encourage everyone to learn Scala. 😉
 

Continue Reading

What is a magic number, and why is it bad?

[java]
public class Foo {
public void setPassword(String password) {
// don’t do this
if (password.length() > 7) {
throw new InvalidArgumentException(“password”);
}
}
}
[/java]
[java]
public class Foo {
public static final int MAX_PASSWORD_SIZE = 7;
public void setPassword(String password) {
if (password.length() > MAX_PASSWORD_SIZE) {
throw new InvalidArgumentException(“password”);
}
}
}
[/java]
It improves readability of the code and it’s easier to maintain. Imagine the case where I set the size of the password field in the GUI. If I use a magic number, whenever the max size changes, I have to change in two code locations. If I forget one, this will lead to inconsistencies.
The JDK is full of examples like in Integer, Character and Math classes.
PS.: Static analysis tools like FindBugs and PMD detects the use of magic numbers in your code and suggests the refactoring. more

Continue Reading

Kilka dobrych rad dla koderów..

 

Książki godne polecenia:

 

  1. “Clean Code: A Handbook of Agile Software Craftsmanship” – Robert C. Martin
  2. “Growing Object-Oriented Software, Guided by Tests” – Steve Freeman
  3. “Agile. Programowanie zwinne: zasady, wzorce i praktyki zwinnego wytwarzania oprogramowania w C#” – Robert C. Martin, Micah Martin
  4. “Head First Design Patterns”, Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra, Elisabeth Robson
  5. “The Art of Unit Testing: With Examples in .Net” – Roy Osherove
  6. “Test Driven Development: By Example” – Kent Back
  7. “Refactoring: Improving the Design of Existing Code” – Martin Fowler, Kent Beck, John Brant
  8. “Agile Testing: A Practical Guide for Testers and Agile Teams” – Lisa Crispin
  9. “Managing the Testing Process: Practical Tools and Techniques for Managing Hardware and Software Testing” – Rex Black
  10. “Fundamental Concepts for the Software Quality Engineer” – Taz Daughtrey
  11. “Practical Guide to Software Quality Management (Artech House Computing Library)” – John W. Horch
  12. “Lessons Learned in Software Testing: A Context-Driven Approach” – Cem Kaner, James Bach, Bret Pettichord
  13. “Software Test Automation” – Mark Fewster, Dorothy Graham
  14. “The Psychology of Computer Programming” – Gerald M. Weinberg
  15. “Elements of User Experience” – J.J. Garrett
  16. “The Tangled Web” – Michał Zalewski

 

Technologie, które warto znać:

 

  • Java + scala
  • C# i .NET
  • Java Script
  • HTML 5
  • Selenium
  • WebAI
  • Cloud Computing

 

Blogi i portale, które warto śledzić:

 

 

Inne:

 

 

Dobre rady:

 

  • zbuduj portfolio swoich projektów (pokaż kod źródłowy, testy automatyczne, komentarze)
  • zacznij pracę zawodową w trakcie studiów
  • czytaj techniczne książki ale głównie praktykuj
  • improve your english skills constantly…und Deutsch..
Continue Reading

Angular.js z DevMeetings.com

 

Startujemy z kursem online z #AngularJS!
Zapraszamy na http://xplatform.org/ – rusza wersja beta.

Po rejestracji na xplatform lub zalogowaniu przez G+ / FB uzyskujecie dostep do pierwszych 3 odcinkow kursu. Kolejne 25 odcinkow bedziemy udostepniac w najblizszych dniach – od expressions, przez dyrektywy po formularze z walidacja.

Xplatform oraz kurs Angulara sa w fazie beta – liczymy na wyrozumialosc i czekamy na Wasze komentarze. Platforme ciagle rozwijamy, pracujemy nad lepszym dzwiekiem, nad ciekawsza dramaturgia tutoriali, nad microtaskami, itp.

Zapraszamy na http://xplatform.org/

Continue Reading

What is Liquibase ? – tutorial from scratch

 

Liquibase http://www.liquibase.org/ is a great open source tool database-independent for tracking, managing and applying schema changes. All changes to the database are stored in xml-files, each changeSet is identified by a combination "id" and "author" tag as well as the name of the file itself. A list of all applied changes is stored in each database which is consulted on all database updates to determine what new changes need to be applied. As a result, there is no database version number but this approach allows it to work in environments with multiple developers and code branches.

 

! ! !  Automatically creates DatabaseChangeLog Table and DatabaseChangeLogLock Table when you first execute a changeLog File. ! ! ! 

 

What we shoud have:

0. JDK 7

1. Java IDE – Eclipse/IDEA etc.

2. Maven

3. Example project

 

 

Screenshot at 11-39-21 Screenshot at 11-37-44

now i have created an empty Maven project. Now i have to configure pom.xml file- the source code is on github repository: https://github.com/TomaszWaszczyk/liquibase-tutorial-quickstart

 

We should remember that Liquibase is able to create first changelog file, how i have done it:

Screenshot at 16-07-42

 

now in the project's directory we run the following commands: (it depends on what we want to do)

 

[c]
clean compile db:create
clean compile db:schema
clean compile db:update
clean compile liquibase:update -Dliquibase.contexts=dev
clean compile liquibase:dropAll liquibase:update -Dliquibase.contexts=dev
[/c]

 

In this we have configured Liquibase, now in order to change a database we can create new so called changeSet and run update command. Full repository with source code you can find here: https://github.com/TomaszWaszczyk/liquibase-tutorial-quickstart

Continue Reading

Negacja w Java czy zawsze potrzebna ?

 

Ostatnimi czasy czytam książkę: https://waszczyk.com/books/lekcja-programowania-najlepsze-praktyki/ i bardzo mi się spodobał malutki fragment kodu (strona 16.). Często taki kod spotykamy i jak widzimy poniżej można go spokojnie uniknąć. Jeśli chodzi o samą książkę polecam ją osobom którzy programują w C/C++ chociaż jestem na 50. stronie. Opinię napiszę jak ją skończę 😉 samą książkę dostałem w nagrodę za konkurs zorganizowny przez http://www.future-processing.pl/ a że nigdy nie było na nią zacząłem ją czytać kiedy umiem sobie zorgaznizować więcej czasu wolnego. 

 

negacja

Continue Reading