Lucero del Alba, Dec 07

7 Atom Add-ons for Running Code and Previewing Changes

Lucero del Alba introduces 7 Atom add-ons for previewing changes in HTML, CSS, JS and Markdown, and for executing interpreted and compiled code.
Wolfram Hempel, Nov 25

Deepstream: an Open-source Server for Building Realtime Apps

Wolfram Hempel discusses issues around building realtime apps at scale, and introduces deepstream, an extensible, open-source server.
Yaphi Berhanu, Nov 17

Projects Can Sometimes Be the Worst Way to Learn JavaScript

Yaphi Berhanu explains why trying to learn JavaScript by working on projects can be misguided, and offers tips on a better approach.
Lucero del Alba, Nov 16

How to Build an Image with the Dockerfile

Lucero covers how to build an image with the Dockerfile, explaining syntax, best practices, basic tools and runtime libraries, packages and shipping.
Patrick Catanzariti, Oct 31

There Are More Virtual Reality Headsets Than You Realize!

Patrick Catanzariti provides a guide to how many virtual reality headsets are already available today and how many more are on their way!
Michael Grogan, Oct 26

Shiny and R: How to Add Themes and Customize Error Messages

Michael Grogan explains how to link the UI and server side in a Shiny app, customize Shiny themes, and implement error messages to guide end users.
Chris Ward, Oct 07

Developing Add-ons for Enterprise Apps like JIRA

Chris Ward looks beyond developing for Google Play and Apple's App Store to enterprise app stores, and their opportunities for better returns and support.
Craig Buckler, Sep 30

Using JOINs in MongoDB NoSQL Databases

NoSQL databases use denormalized data, so relational JOINs are impossible. Craig explains how MongoDB's new $lookup operator overcomes this restriction.
Lucero del Alba, Sep 27

DevOps by Example: Tools, Pros and Cons of a DevOps Culture

Lucero del Alba presents three DevOps tools, and considers the benefits and challenges of switching to a DevOps culture.
Ben Dickson, Sep 16

How to Protect Your Website Against SQL Injection Attacks

Ben Dickson covers what you need to know about SQL injection and how to protect your site against it.
Michael Grogan, Sep 07

Shiny, R and HTML: Merging Data Science and Web Development

Michael Grogan looks at the commands used to build an application in Shiny — both on the UI (user interface) side and the server side.
Charles Costa, Sep 07

The Future of Doxing in a World of Facial Recognition

Charles Costa looks at the implications facial recognition may have on the doxing attacks of the future.
Adam Bard, Aug 26

Python Web Applications: The basics of WSGI

Adam introduces the the basics of the Web Server Gateway Interface, which lies beneath every Python web framework, showing how to code your first WSGI app.
Chris Ward, Aug 24

Building Your First Blockchain App with Eris

Chris Ward explores getting started in blockchain using Eris, a blockchain and smart contract application platform for developers.
Carlos Morera De La Chica, Aug 12

What Does RESTful Really Mean?

An answer to the question how constraints, HTTP verbs, response codes, and other details come together to define REST.
Nicolai Parlog, Aug 10

JVMLS 2016: A Recap of Java Virtual Machine Language Summit

Last week was the Java Virtual Machine Language Summit (JVMLS) where renown experts present the newest developments of the JVM.
Nicolai Parlog, Aug 05

Self Types with Java's Generics

Self types let a class reference its own type. Java doesn't have them, but there is a trick.
Lucero del Alba, Jul 29

Understanding Docker, Containers and Safer Software Delivery

Lucero explains the concept of software containers and how Docker helps solve many of the issues relating to software delivery and app deployment.
Shaumik Daityari, Jul 20

Python on the Web: Why Frameworks Like Django Are Hot

Shaumik Daityari looks at what makes Python suited to web development, and why it's the go-to language for an increasing number of web developers.
Thomas Punt, Jun 29

Elixir's Ecto Querying DSL: Beyond the Basics

Thomas explores Ecto features, including query composition, joins and associations, SQL fragment injection, explicit casting, and dynamic field access.
Adam Bard, Jun 28

Heroku Alternative: Deploy Apps with Dokku on DigitalOcean

Adam Bard shows how to get small, low-traffic projects up and running with Dokku on DigitalOcean, creating a Heroku-like experience without the cost.
Elio Qoshi, Jun 27

Quick Read: Blockchain's Future after Bitcoin

Elio Qoshi looks at the future of blockchain technology post-Bitcoin, after recent public difficulties with the Bitcoin ecosystem.
Thomas Punt, Jun 24

Understanding Elixir's Ecto Querying DSL: The Basics

Thomas looks at the basics of querying with Elixir's Ecto library, going through joins, associations, aggregation functions, and so on.
Lincoln Daniel, Jun 21

Java Serialization: Building a Persistent Phone Book

Serialization is a powerful tool. It's what allows us to store objects on disk and reconstruct them in memory when necessary -- perhaps when the program restarts. For anyone who wants to move beyond the run-and-forget type of programs, serialization is essential. We can serialize objects to create a sense of persistence in our programs so that the information we gather is not lost, or forgotten, when our program ends. Let's take a look at how to implement serialization in Java

The folks over at Oracle define serializable objects like so:

To serialize an object means to convert its state to a byte stream so that the byte stream can be reverted back into a copy of the object.

There may be many reasons for a programmer to serialize an object, but we will focus on the reason of storing it in a file to be accessed later.

In this case, deserialization is then the process of reverting the serialized form of an object into a copy of the object to use as expected. You can serialize any object that is an instance of a class that either implements java.io.Serializable interface or its subinterface, java.io.Externalizable itself or is the subclass of a class that does.

The Application

We're going to build a simple phone book app in the console. The program will allow a user to add contacts to their phone book, view their contacts, delete contacts, and save their contacts to a file for later. When the user ends the program and relaunches it later, they will be asked for the name of the file they want to load their phone book contacts from. If a file containing the serialized form of the phone book's contacts exists, the phone book will be loaded from disk and made available to the user for manipulation.

The code related to this article can be found here.