lundi 25 novembre 2013

Java Code Geeks Weekly: 10 Rules of a Zen programmer, Twitter improves JVM performance, Github is not your CV





Your Weekly Java Code Geeks Dose

Download Whitepaper from Qualys


Continuous Security Monitoring (CSM)

Learn what CSM is, how to implement it, and discover the most applicable use cases in this free white paper.

Given that you can't prevent all cyber attacks, you need to ensure you detect attacks as quickly as possible. The concept of continuous monitoring has been gaining momentum, driven by both compliance mandates (notably PCI-DSS) and the US Federal Government's guidance on Continuous Diagnostics and Mitigation, as a means to move beyond periodic assessment. This makes sense given the speed that cyber attacks can proliferate within your environment.

JCG Partner of the Week


The JCG Partner of the week is:

Manu PK
Manu develops software applications using Java and related technologies. Geek, Tech Blogger, open source and web enthusiast..

Latest Article: A MindMap for Java Developer Interviews

Best of the Week from JCG


21 signs of BAD MANAGERS I met in my career as a software manager (by Ionel Condor)
Bias against action or against planning, simply waiting or postponing for ever; embrace the status-quo, Secrecy, not willing to share information, giving the feeling that having access to information is a privilege reserved to managers, Working very long hours to prove hard work or hide incompetence...

Using serialization to find dirty fields in an object (by Raji Sankar)
Say you are developing a framework to auto-save objects into a database. You need to detect changes made between two saves, so that only modified fields are saved. How to detect dirty fields. The easiest way to do this is to traverse through the original data and the current data and compare each field separately.

What Garbage Collector are you using? (by Nikita Salnikov Tarnovski)
While dealing with the problems in this interesting domain, we thought to share some insights to GC algorithm usage. For this we conducted a study on how often a particular GC algorithm is being used. The results are somewhat surprising. Let me start with the background of the data – we had access to data from 84,936 sessions representing 2670 different environments to use in the study. 13% of the environments had explicitly specified a GC algorithm.

How to Optimize Your Website for Speed (by Mike Dalisay)
Website speed becomes an obsession of search engines like Google and one of the reasons is the rapid growth of mobile internet browsing. If you're working with the web (developers, designers, bloggers and students), it is now a requirement to have knowledge in making a website load fast, and our post for today will give you some ideas on why and how to achieve it.

3 ways of handling exceptions in JUnit. Which one to choose? (by Rafal Borowiec)
In JUnit there are 3 popular ways of handling exceptions in your test code: try-catch idiom, With JUnit rule, With annotation. Which one should we use and when?

Latest JCG Tutorials and Examples


Android Content Provider Example
A Content Provider is used to share and access data from a central repository. Usually android applications keep data hidden from the other applications but sometimes, it is useful to share data across them. So, content provider is a suitable reason to share data with other applications, based on a standard interface. There are many different ways to store data in a content provider but in most cases a SQLiteDatabase is used. In this tutorial, we are going to create our own content provider using SQLite database, in which we will store and handle our friends' birthday.

Create Web Application Project with Maven Example
In this tutorial, we will show you an easy way to create a Java web application project, using Apache Maven. The web application will make use of the Spring MVC and it will be transformed, in order to be recognizable and supported by the Eclipse IDE. In this example, we use the following tools on a Windows 7 platform: Apache Maven 3.1.1, Eclipse Kepler Service Release 1, JDK 1.7, Spring 3.2.3.RELEASE, Apache Tomcat 7.

RESTEasy File Upload Example
In this tutorial we are going to see how In this example we are going to see how you can upload a File to a server using a JAX-RS REST Service using RESTEasy. In this example we are going to use an HTML Form that has one input field of type file. When the HTTP POST request is constructed, it will contain a media type of multipart/form-data.

JUnit Using Assertions and Annotations Example
In this example we are going to create test cases so as to understand the use of assertions and annotations in JUnit testing framework. Also, we will see how to run these test cases from the command line by using the org.junit.runner.JUnitCore. If you prefer running your test cases via Eclipse, you can have a look at JUnit Getting Started Example.

New and Noteworthy from the Community


World of the NoSQL databases
The relational database model focuses on the organization of the data in the form of two-dimensional tables. Each relational table is a two-dimensional array that has the following properties: each element of the table is a data element...

Why GitHub is not your CV
Two days ago, Ashe Dryden published an article I've been desperately wishing someone would write for months: The Ethics of Unpaid Labor and the OSS Community. It's a detailed, well-researched take-down of the seemingly quite popular myth that open-source contributions are a useful way to screen candidates for software jobs.

Why Python Is The Most Powerful Programming Language For Web Applications
Python is among the few programming languages that have become an essential component in Linux, MySQL, Perl, PHP, and Apache along with a packaged LAMP Web Stack. Ever since its inception, Python has grown along with other dynamic programming languages such as Ruby, to substitute the conventional programming languages such as C# and Java.

Hiring Software Developers
I've been reflecting recently on my past few years working as a software developer. During those years I've had a lot of job interviews. I got many rejections, a few job offers and never heard back from some companies. This is a review, from my own perspective, of what works and what doesn't work when it comes to interviews and hiring processes for software developers.

How Twitter Improved JVM Performance by Reducing GC and Faster Memory Allocation
Netty is a high-performance NIO (New IO) client server framework for Java that Twitter uses internally as a protocol agonostic RPC system. Twitter found some problems with Netty 3's memory management for buffer allocations beacause it generated a lot of garbage during operation.

Blast from the Past !


The 10 rules of a Zen programmer
On a rainy morning I found myself sitting on the desk thinking about efficient working. Before I started as a freelancer I had some days were I worked lots but could look only back on a worse outcome. I started with Zen practice back in 2006. What clearly came to my mind before a good while was: the old Zenmasters already knew before hundreds of years, how today programmers should work.

Java Annotations Tutorial with Custom Annotation
Java Annotations provide information about the code and they have no direct effect on the code they annotate. In this tutorial, we will learn about Java annotations, how to write custom annotation, annotations usage and how to parse annotations using reflection. Annotations are introduced in Java 1.5 and now it's heavily used in Java frameworks like Hibernate, Jersey, Spring. Annotation is metadata about the program embedded in the program itself.

Getting rid of null parameters with a simple spring aspect
What is the most hated and at the same time the most popular exception in the world? I bet it's the NullPointerException. NullPointerException can mean anything, from simple "ups, I didn't think that can be null" to hours and days of debugging of third-party libraries (try using Dozer for complicated transformations, I dare you).

mercredi 20 novembre 2013

NetBeans IDE 7.4 is here...

NetBeans IDE 7.4 extends the advanced HTML5 development support introduced in NetBeans IDE 7.3 to Java EE and PHP applications, while offering new support for mobile web development on the Android and iOS platforms, including support for the Cordova framework. Additional highlights include support for preview versions of JDK 8, and continued enhancements to JavaFX, PHP, C/C++, Maven and other features.
NetBeans IDE 7.4 is available in English, Brazilian Portuguese, Japanese, Russian, and Simplified Chinese.

HTML5
  • Cordova application development
  • Support for Android and iOS Browsers
  • Editing support for stylesheet languages: SASS and LESS
  • Browser switcher in main toolbar
  • Saving changes from Chrome Developer Tools
  • Network monitor
    NetBeans IDE Browser Switcher
    Full Screenshot
    JavaScript
    • Editing support for AngularJS, Knockout and ExtJS frameworks
    • Navigator and code folding in JSON files
    • Enhanced code completion with improved accuracy
    JSON Navigator in NetBeans IDE
    Full Screenshot
    Java EE
    • HTML5 features available in Java EE projects
    • Wizards for JSF 2.2 Resource Library Contracts and FacesComponents
    HTML5 Application in Java EE in NetBeans IDE
    PHP
    • HTML5 features available in PHP applications
    • Nette Framework 2 (with Latte templates) and Zend Framework 2 support
    • Atoum testing framework support
    • Editor and Rename type refactoring improvements
    • Static code analysis support
    Nette Framework2 Support in NetBeans IDE
    Full Screenshot
    Java
    • Preview support for JDK 8 features: Profiles, Lambdas
    • Code completion, Hints and Refactoring improvements 
    • Native packaging
    • Updated bundled Ant 1.9.1 and Maven 3.0.5
    JDK8 Preview Support in NetBeans IDE
    JavaFX
    • New FXML File dialog in Maven projects
    • Tighter alignment for JavaSE and JavaFX project types
    • Improvements to Project Deployment options

    C/C++
    • Run/Debug launchers support
    • Find Usages improvements
    • C/C++ formatting style per project
    Find Usages improvements in NetBeans IDE
    Miscellaneous
    • New Tasks Dashboard and Notifications windows
    • Lock Contention for profiling tasks
    • Bugzilla Offline Mode
    • Enhancements to Versioning tools: Subversion, Git, Mercurial
    • TestNG and Junit improvements
    • Improvements to Databases
    Tasks Window in NetBeans IDE

    dimanche 17 novembre 2013

    The Internet of Things Needs a Lot of Work

    IDG News Service (11/12/13) Stephen Lawson 

    Mobile connected devices present too many challenges for users, said industry leaders during a panel at the recent Open Mobile Summit. Frog Design's Mark Rolston notes that users have to link devices, enter passwords, manage home Wi-Fi, and deal with corporate IT departments at work, and are near their limit for babysitting devices all day. The experts say the whole premise of mobile interfaces is wrong, noting devices should be asking users what they want and learning from prior events rather than forcing users to ask. "There's just a million use cases you can think of where today there's [an] interface to try to understand what the user wants, and in the future there should just be action that does the right thing," says Rick Osterloh at Google's Motorola Mobility subsidiary. He says a car should automatically connect to the Internet by itself and automatically turn on the light when the driver reaches home. Rolston also notes that rather than using a phone to control devices in the home, the many connected appliances together should form a computer of their own. "The computer is not this box in the corner, or box in your pocket, it's something you are surrounded by," Rolston says.