Software Development and related activities

Something I want to share with you

Reading List 2014-April-22

Announcements

  1. Scala 2.11.0 is now available!
  2. Scala 2.11 Has Arrived!
  3. sqltyped 0.4.0
  4. Release version 1.0.8 · skinny-framework/skinny-framework · GitHub
  5. Finatra 1.5.3 Released

Cloud

  1. Using Puppet to Automate Google Compute Engine
  2. No IaaS? No Problem.
  3. PeopleFun chooses Google App Engine to offload infrastructure tasks and build games people love to play

Android

  1. Butter Knife
  2. Android Interface Definition Language (AIDL)
  3. Security Tips | Android Developers
  4. Scheduling Repeated Tasks in Android

Security

  1. Heartbleed disclosure timeline: who knew what and when
  2. Please Put OpenSSL Out of Its Misery
  3. Detecting and Fixing XSS using OWASP tools

General

  1. Results of the GitHub Investigation · GitHub
  2. This is why Microsoft won. And why they lost.
  3. Predicting happiness from demographics and poll answers
  4. The Truth About Google X: An Exclusive Look Behind The Secretive Lab’s Closed Doors

Software development

  1. Code as if everyone is the thief.
  2. huginn/README.md at master · cantino/huginn · GitHub
  3. Thoughts on The Reactive Manifesto
  4. Productive Developers are Smart and Lazy
  5. Don’t Learn to Code, Learn to Program – But Come Back in 10 Years
  6. How can I do This? With SQL of Course!
  7. I don’t know.
  8. A concrete approach to learning how to program
  9. Kernel 101 -€“ Let’€™s write a Kernel – Arjun Sreedharan
  10. How rows_sent can be more than rows_examined?
  11. Please, Run That Calculation in Your RDBMS
  12. All you are is attitude
  13. Node.js beyond the basics
  14. angular/angular-seed · GitHub
  15. ng-boilerplate

Agile

  1. Definition of done
  2. Having an exploratory meeting? Ask how will the feature be tested
  3. Personal WIP limit directly impacts Cycle Time
  4. On concurrency and Idempotence: TDD just as production code should be thread safe
  5. Hudson/Jenkins Git build all branches
  6. Test sizes | Google Testing Blog

Java

  1. Is Java 8 the fastest JVM ever? Performance benchmarking of Fork-Join
  2. Sonatype questions Maven scores in follow-up to Java Build Tools report
  3. Java 7 vs. Java 8: Performance Benchmarking of Fork/Join
  4. Spring test with thymeleaf for views
  5. Validating JAX-RS resource data with Bean Validation in Java EE 7 and WildFly
  6. Lambda Expressions in Java 8
  7. Getting Mutants to test your Tests
  8. HOW-TO: Spring Boot and Thymeleaf with Maven
  9. Using the JVM Performance Counters
  10. How to manage Git Submodules with JGit

Scala

  1. Sprinter

Politics

  1. Putin’s Improv Act
  2. Snow Blind

Reading List 2014-April-21

General

  1. Lens Blur in the new Google Camera app
  2. SV150: Apple, Inc. earns more than HP, Google, Intel & Cisco combined
  3. Chrome Remote Desktop goes mobile

Software development

  1. Software Engineering Advice from Building Large-Scale Distributed Systems
  2. Brian Goetz > Quotes
  3. Easter Hack: Even More Critical Bugs in SSL/TLS Implementations
  4. This Advice From IDEO’s Nicole Kahn Will Transform the Way You Give Presentations
  5. Quick tip: Improve developer habits by showing time cost of DB queries
  6. TolerantReader
  7. Go Performance Tales
  8. Beware the bandwidth gap – speeding up optimization
  9. paperplanes. The Developer is Dead, Long Live the Developer
  10. ActiveMQ – Network of Brokers Explained
  11. Two Things I Learned On Traffic And Weather Today
  12. In a cloning first, scientists create stem cells from adults
  13. Standard ECMA-404
  14. Afraid of reopened issues?
  15. Using GitHub for Push-to-Deploy
  16. Grails Goodness: Extending IntegrateWith Command
  17. Managing the Impossible with an Agile Budget
  18. How to succeed when you have no special skills
  19. New cache design speeds up processing time by 15 percent
  20. Introduction to Enterprise Application Integration

Java

  1. Java Caches: Ehcache, Hazelcast, Infinispan
  2. Java 8 LongAdders: The Right Way To Manage Concurrent Counters
  3. Java 8 Pocket Guide
  4. Project Sagan: Upgrading to JDK 8
  5. Dubious Aspects of Features of JDK 8
  6. Handy New Map Default Methods in JDK 8
  7. Tracking Exceptions – Part 4 – Spring’s Mail Sender
  8. Quick, and a bit dirty, JSON Schema generation with MOXy 2.5.1
  9. Automating JMeter tests with Maven and Jenkins
  10. Clean Synchronization Using ReentrantLock and Lambdas

Scala

  1. Scala levels: beginner to expert, application programmer to library designer
  2. Transitioning to Scala

In Russian

  1. FAQ: Парадокс конкисты
  2. FAQ: Средневековый университет
  3. FAQ: Лексика языков мира
  4. FAQ: Технология мысли
  5. FAQ: Идеи декабристов
  6. Точка зрения | Система грантов
  7. Точка зрения | Профсоюз ученых
  8. Главы | Проблемы в функционировании национальных систем исследований
  9. Главы | Дефицит демократии
  10. Главы | История патентного права в России
  11. Главы | Территория Украины: историческое ядро и позднейшие приращения
  12. А все ж татары поприятней
  13. Женский род, единственное число
  14. Ступай, дружок, в тайный кружок
  15. Гомункулус советикус
  16. Новости Большого адронного коллайдера
  17. Как открыли экзопланету Kepler-186f?
  18. Иван Васильевич и его профессия

Reading List 2014-April-18

Death of Gabriel Garcia Marquez is definitely the worst yesterday’s news. Read more: Gabriel Garcia Marquez dies at 87

Announcements

  1. CDI 1.2 Released (The Aquarium)
  2. CDI 1.2 is released | Contexts and Dependency Injection
  3. AlloyUI 2.5.0 Released
  4. AngularDart 0.10.0 (ostemad-teleportation) : breaking changes and versioning
  5. Spring XD 1.0.0.M6 Released
  6. Spring Security OAuth 2.0.0.RC1 Available
  7. The New Linode Cloud: SSDs, Double RAM & much more | Linode Blog

Software development

  1. The Heartbleed Aftermath: all CloudFlare certificates revoked and reissued
  2. Starbucks Does Not Use Two-Phase Commit
  3. When two-factor authentication is not enough
  4. Big Data Quality: Certify or Govern?
  5. Things You Should Never Do, Part I
  6. Tips for Getting Your Android Apps Looking Good on Amazon Fire TV
  7. Developers’ Guide to Static Code Analysis
  8. Code School and the Google Maps SDK for iOS
  9. Git and project dependencies
  10. A Simple Explanation for git rebase
  11. 5 ways to improve battery life in your app
  12. The Magic of Modularity

Agile

  1. Testability and Cost of Change
  2. Continuous Delivery: The price of admission..
  3. The advantage of Scrum in evaluating “new stuff”

Java

  1. Using jOOQ with Spring: CRUD
  2. Webinar Replay: Building ‘Bootiful’ Applications with Spring Boot
  3. New BigInteger methods in Java 8
  4. Using Selenium with JMeter’s WebDriver Sampler
  5. How to do Continuous Integration with Java 8, NetBeans Platform 8, Jenkins, Jacoco and Sonar
  6. Inject any custom service into Liferay WCM templates

Scala

  1. Changes in Scala 2.11
  2. Welcome to Scala 2.11
  3. Webinar: Welcome to Scala 2.11
  4. Typesafe announces Akka Streams, a part of the Reactive Streams Initiative
  5. Primitive recursion with fix and Mu

In Russian

  1. Разномыслие, как ни странно, началось при Сталине… | ПостНаука
  2. Новый метод позволил наложить рекордное ограничение на время жизни хиггсовского бозона

Reading List 2014-April-17

Software development

  1. Seven Databases in Seven Days – Riak
  2. Design, Develop, and Distribute at I/O 2014 | Google Developers Blog
  3. Coloring Different Data Sources in IntelliJ IDEA
  4. Todon’t
  5. How to Level Up

Video

  1. Fireside Chat: Android Design

Java

  1. List of all JEPs for JDK8
  2. JEP 174: Nashorn JavaScript Engine
  3. Asynchronous CDI Events? (The Aquarium)
  4. Conway’s Game of Life and the Flyweight Pattern
  5. We’re Hacking JDBC, so You Don’t Have To
  6. The Real Cost of Logging
  7. JSON Schema (The Aquarium)
  8. Spring MVC Test with Geb
  9. Some new Guava classes targeted for release 10 | Google Groups

Some background discussions on Java 8 Lambda, Optional and default methods in interfaces

  1. Optional require(s) NonNull
  2. When lambdas become objects
  3. Allow default methods to override Object’s methods
  4. Checked exceptions within Block
  5. Allow lambdas to implement abstract classes

Reading List 2014-April-16

Announcements

  1. Apache Hadoop 2.4.0
  2. Apache Tomcat Native 1.1.30 released | Mladen Turk
  3. Apache Tomcat Connectors 1.2.40 released | Mladen Turk
  4. Second Service Release For Spring Data Release Train Codd Released
  5. Announcing the Release of Google App Engine 1.9.3
  6. Google Cloud Platform expands to Asia Pacific
  7. Announcing Google BigQuery and Datastore Connectors for Hadoop
  8. Spring Integration 4.0 Release Candidate Available
  9. Final Draft of OSGi Core Release 6 available for download

Software development

  1. The Four Parts of a Minimal Viable Product
  2. Better code through code reviews
  3. Social Processes and Heartbleed, Part 1
  4. Angular and Durandal Converge
  5. What Heartbleed Tells Us About the Need for IT Automation
  6. No More Passwords for Apps using Login with Amazon on Kindle Fire
  7. Innodb redo log archiving

Java

  1. 10 Books Every Java Developer Should Read
  2. New BigInteger Methods in Java 8
  3. Java 8 Friday: No More Need for ORMs
  4. Everything about Java 8
  5. Maven and Java multi-version modules
  6. JDK 8 Security Enhancements
  7. Java 8 Nashorn Tutorial
  8. 10 Books Every Java Developer Should Read
  9. Using jOOQ with Spring: CRUD
  10. trackr: An AngularJS app with a Java 8 backend – Part I
  11. Spring expression language (spel) and Spring boot in action
  12. TimeUnit Enum in Java
  13. We hate/love lambda
  14. Inject any custom class or service into web content templates | Liferay blogs
  15. Covariant Blabbering : Damn smart idea (2) : DynamicVariable

In Russian

  1. Эксперимент LHCb окончательно доказал реальность экзотического мезона Z(4430)
  2. FAQ: Биоархеология и трепанация
  3. Как открыли новую экзотическую частицу?

Using Unitils ReflectionAssert

Often it is needed to compare two different instances of the class inside test. I.e. we save object into database, then fetch it back from db and we want to be sure if nothing was lost during saving/reading.

In order to make such assertions more easier and maintainable one can use great Unitils library which has useful class ReflectionAssert

First, update parent’s pom.xml:

pom.xml changes in parent module
1
2
3
4
5
6
7
8
9
<properties>
    <unitils.version>3.4</unitils.version>
</properties>
<dependency>
    <groupId>org.unitils</groupId>
    <artifactId>unitils-core</artifactId>
    <version>${unitils.version}</version>
    <scope>test</scope>
</dependency>

Then, add dependency to the child module:

pom.xml changes in child module
1
2
3
4
<dependency>
    <groupId>org.unitils</groupId>
    <artifactId>unitils-core</artifactId>
</dependency>

Usage is very simple: Add static import to the class.

pom.xml changes in child module
1
import static org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals;

and use it instead of regular JUnit assert:

1
assertReflectionEquals(expected, actual);

It is possible to pass reflection comparator modes as optional parameters to the above method.

Be ware that this method is not very useful if you want to compare objects which has floating point or double parameters – ReflectionAssert compares double and float values using ==, so it is not very useful. It is not possible to pass epsilon for comparison.

excerpt from org.unitils.reflectionassert.comparator.impl.LenientNumberComparator#compare
1
2
3
4
5
6
7
// ...
Double leftDouble = getDoubleValue(left);
Double rightDouble = getDoubleValue(right);
if (!leftDouble.equals(rightDouble)) {
    return new Difference(differenceMessage, left, right);
}
// ...

If you need to compare double values in JUnit assertions then it is better to use hamcrest library:

1
2
3
4
5
import static org.hamcrest.number.IsCloseTo.closeTo;
import static org.junit.Assert.assertThat;

// in @Test method:
assertThat(actual.getFederalIncomeTax(), closeTo(expected.getFederalIncomeTax(), EPSILON))

Happy hacking!

Using AssertJ

AssertJ is a library which provides fluent strongly-typed assertions to use in unit tests.

Example of assertions written with AssertJ:

1
2
3
4
5
6
7
8
import io.github.uthark.blog.assertj.Assertions.assertThat;

// ... within @Test
User result = userDao.findByLogin("username");
assertThat(result).
    isNotNull().
    isActive().
    hasLogin("username");

As you can see assertions look much more readable. The integration of assertj into Maven project is very easy:

  1. Update pom.xml in parent module
pom.xml changes in parent module.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<properties>
    <assertj-core.version>1.6.0</assertj-core.version>
    <assertj-assertions-generator-maven-plugin.version>1.2.0</assertj-assertions-generator-maven-plugin.version>
</properties>

<dependencyManagement>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj-core.version}</version>
        <scope>test</scope>
    </dependency>
</dependencyManagement>

<pluginManagement>
    <plugin>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-assertions-generator-maven-plugin</artifactId>
        <version>${assertj-assertions-generator-maven-plugin.version}</version>
        <executions>
            <execution>
                <id>generate-assertions</id>
                <phase>generate-test-sources</phase>
                <goals>
                    <goal>generate-assertions</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

</pluginManagement>
  1. Update pom.xml in child module
Changes in child module.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<dependencies>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-assertions-generator-maven-plugin</artifactId>
            <configuration>
                <!-- you can define collection packages: -->
                <packages>
                    <param>io.github.uthark.blog.assertj</param>
                </packages>

                <!-- Or specify classes one by one. -->
                <classes>
                    <param>io.github.uthark.blog.assertj.User</param>
                </classes>
            </configuration>
        </plugin>
    </plugins>
</build>

After this changes it is possible to generate assertions for the classes you want test:

1
mvn assertj:generate-assertions

By default assertj will generate assertion classes in target/generated-test-sources/assertj-assertions/, it is possible to override this behaviour by passing configuration element targetDir to plugin.

Additonal documentation for Maven plugin can be found here

Happy hacking!

Reading List 2014-April-15

Software development

  1. Building Carousel, Part I: How we made our networked mobile app feel fast and local
  2. Write line notes from your phone · GitHub
  3. Scaling the Facebook data warehouse to 300 PB
  4. Why did we lose the XP Practices?
  5. EC2 Update – Previous Generation Instances | Amazon Web Services Blog
  6. Working with Google Analytics API v4 for Android
  7. The Grails Depedency Injection Inheritance Pitfall

DevOps

  1. Adaptive IT — Why Vagrant is the Best DevOps Tool Ever
  2. Using Chef to Automate Google Compute Engine

Java

  1. 10 JDK 7 Features to Revisit, Before You Welcome Java 8
  2. 5 Features In Java 8 That WILL Change How You Code
  3. Cache Abstraction: JCache (JSR-107) Annotations Support
  4. Oracle Nashorn: A Next-Generation JavaScript Engine for the JVM
  5. Use Nashorn and WebJars to execute Javascript server-side
  6. What’s New in Java 8: Lambdas
  7. JEP 180: Handle Frequent HashMap Collisions with Balanced Trees
  8. JEP 155: Concurrency updates (jsr166e)

Scala

  1. The other 99% — Monadic
  2. Reflections on Akka

Reading List 2014-April-14

Releases

  1. Our New Reader View in Pocket 5.4 for Android
  2. Spring Batch 2.2.6.RELEASE is now available
  3. MongoDB 2.6 is out

Software development

  1. New user and sequence based segments in the Core Reporting API
  2. Looking for PostgreSQL Performance Issues
  3. Why Google Is Broken for Debugging
  4. 13 | Joel on Software
  5. Recursion: Dream Within a Dream
  6. What to Think About During Exercise
  7. ScaleArc: Benchmarking with sysbench

Java

  1. Five Synchronizers in Java
  2. Oracle Drops Collection Literals in JDK 8
  3. Creating Object Pool in Java
  4. Why JSR-310 isn’t Joda-Time
  5. Non-blocking IO in Servlet 3.1 By Example
  6. 15 Must Read Java 8 Tutorials
  7. Open source Java projects
  8. JSF + AngularJS = AngularFaces? (The Aquarium)
  9. Lambda Expressions
  10. Attempt to map WCF to Java terms
  11. Yet another way to handle exceptions in JUnit: catch-exception
  12. Non-blocking I/Os in Servlet 3.1 (The Aquarium)
  13. Liferay CometD Ajax Push / Liferay Reverse Ajax
  14. Java Q&A: The ultimate superclass, Part 2

Reading List 2014-April-11

Software development

  1. Dart improves async and server-side performance
  2. Federal Government Releases Health Care Provider Reference Architecture
  3. The Cost of Context Switching
  4. How Overloading Interacts With C Compatibility
  5. Write Code Every Day
  6. Consumer Release Testing
  7. Google Finds: Centralized Control, Distributed Data Architectures Work Better than Fully Decentralized Architectures
  8. Do Developers Love To Build On MongoDB?
  9. 10 Reasons Not To Use Infinite Scroll On Your Website
  10. First look: MongoDB 2.6, the all-grown-up version

Cloud

  1. Now Available – New Memory-Optimized EC2 Instances (R3)

Java

  1. JEP 169: Value Objects
  2. A Docker Maven Plugin for Integration Testing
  3. Reactive Programming Patterns in Akka using Java 8
  4. Executing Diagnostic Commands Using Attach
  5. Final Results from our Java EE 8 Community Survey (Linda DeMichiel’s Blog)
  6. CSRF protection in Spring MVC, Thymeleaf, Spring Security application

Android

  1. Anti-Malware Monitoring for Android Apps
  2. Expanding Google’s security services for Android

Scala

  1. Memoization of Scala Streams

Reading List 2014-April-10

General

  1. The Job After Steve Jobs: Tim Cook and Apple
  2. In depth: Descriptive Search in Evernote
  3. A Powerful New Way to Edit DNA
  4. XKCD What if? | Faucet Power
  5. Expanding Google’s security services for Android

Cloud

  1. The New Cost Explorer for AWS

Software development

  1. Dart improves async and server-side performance
  2. Don’t Estimate Spikes
  3. Heartbleed
  4. What To Return: IEnumerable or IList?

Java

  1. For Each loop Puzzle in Java
  2. Constructor/Method Parameters Metadata Available Via Reflection in JDK 8
  3. How much faster is Java 8?
  4. New Parallelism APIs in Java 8: Behind The Glitz and Glamour
  5. Why There’s Interface Pollution in Java 8
  6. Dubious Aspects of Features of JDK 8

In Russian

  1. LHCb изучает эффекты адронной дифракции

Reading List 2014-April-09

Security

  1. Security Release of omnibus-gitlab due to CVE-2014-0160 (‘Heartbleed’)
  2. Heartbleed Security Bug: Update for Puppet Users
  3. Dealing with OpenSSL bug CVE-2014-0160 (Heartbleed)
  4. Secure DevOps – Seems Simple

Announcements

  1. Hibernate ORM 4.2.12.Final Released
  2. Akka 2.3.2 Released!
  3. New book: EJB 3 in Action, Second Edition

Scala

  1. Scala Style Guide — Scala Style Guide v1.3.1 documentation

General

  1. DynDNS: Why We Decided To Stop Offering Free Accounts
  2. Yahoo breaks every mailing list in the world including the IETF’s
  3. The Prototype of Future Knowledge Workers

Software development

  1. Software Estimation: How Misperceptions Mean We Almost Always Get It Wrong
  2. Performance Tuning On Android — The Venmo Blog
  3. Spring Test Context Caching + AspectJ @Transactional + Ehcache pain
  4. Liferay: Searching entities through custom attribute value.
  5. Services, Microservices, Nanoservices… oh my!

In russian

  1. Главы | Отходы

Reading List 2014-April-08

Announces

  1. Spring Boot 1.0.1.RELEASE Available Now
  2. Scala 2.11.0-RC4 is now available!
  3. MongoDB 2.6: Our Biggest Release Ever | MongoDB Blog
  4. Announcing Play 2.3-M1 | Google Groups

General

  1. Fire TV: Amazon gets into the set-top box fray with a powerful media and gaming box
  2. How Gmail Happened: The Inside Story of Its Launch 10 Years Ago
  3. Can you hear me now? No, I don’t have that app.

General Software development

  1. Handling multiple branches in continuous integration
  2. If you want fast code, don’t use assembly
  3. Using Android Location API in Weather App – Search city
  4. Numbers Every Programmer Should Know By Year
  5. How (NOT TO) measure latency
  6. Who Solves Which Problems?
  7. Why Abstraction is Really Important
  8. Multi-Level Argparse in Python (Parsing Commands Like Git)
  9. Cassandra lowers the barriers to big data
  10. ReportingDatabase
  11. AngularDart vs. Coffeescript + AngularJS: How Dart won over Coffeescript halfway through the game

Java

  1. Java.next: Contrasting concurrency
  2. Java 8 Friday: The Dark Side of Java 8
  3. Creating your own loop structure in Java 8 lambda
  4. Apache CXF 3.0: JAX-RS 2.0 and Bean Validation 1.1 finally together
  5. Wildfly 8.0 provides seamless JSON support via its JAXRS 2.0 implementation
  6. CompletableFuture for OSGi Remote Services

In russian

  1. Коллаборация CMS продолжает уточнять массу топ-кварка

Reading List 2014-April-07

Software development

  1. Why Hire Older Engineers
  2. Am I really a developer or just a good googler?
  3. Facebook open sources code for managing A/B tests — Tech News and Analysis
  4. AngularJS Tip – Avoid Multiple Variables in ng-src
  5. Introducing Pyston: an upcoming, JIT-based Python implementation
  6. The Power of HTML
  7. Microsoft TypeScript 1.0 Arrives
  8. BlueGreenDeployment
  9. Five Funny Moments in Developer History
  10. Domain-Driven Design Revisited
  11. Application Security – Can you Rely on the Honeymoon Effect?
  12. Differences in Map/Reduce between RavenDB & MongoDB
  13. Microsoft Announces Windows Phone 8.1 With New Action Center, Cortana, Start Screen Improvements
  14. Consume Webservice in Android using intentService
  15. Btrees Are the New Black
  16. Why Ruby Class Methods Resist Refactoring
  17. Subtly Bad Things Linux May Be Doing To PostgreSQL

Agile

  1. Lean is Clean without the C for Complexity
  2. Conquering job hell and multiple app branches using Jenkins & Mercurial

Cloud

  1. The platform-as-a-service winner is … Puppet?
  2. Integration platform as a service, the cloud, and… baby unicorns

Java

  1. Common Misconceptions About Java
  2. javac’s -Xprint Option
  3. javac’s -Xlint Options
  4. Java 8 default methods: what can and can not do?
  5. Hack Computer Boards with Java! (The Java Source)
  6. Why I Like The Verbosity of Java
  7. How not to use Java 8 default methods
  8. Java 8 Adoption Poll Results
  9. 10 Example of Lambda Expressions and Streams in Java 8
  10. In Relation To… Third milestone on the path for Hibernate Search 5
  11. Using AmazonS3EncryptionClient to Send Secure Data Between Two Parties
  12. Dealing with org.hibernate.LazyInitializationException: could not initialize proxy – no Session in Hibernate Java

In Russian

  1. FAQ: Святилища Кавказа