-
The Art of Readable Code - http://www.amazon.com/The-Readable-Code-Dustin Boswell/dp/0596802293/ ; Edição em Português - A Arte de Escrever Programas Legíveis - (Capítulo de Exemplo: http://goo.gl/cQSTr, sumário: http://goo.gl/o1FBD).
-
Growing Object-Oriented Software, Guided by Tests - http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627/ - Um ótimo livro para aprender corretamente Orientação a Objetos juntamente com a prática de testes. Este livro mais o do Meilir Pages-Jones (título abaixo, 3) são leituras obrigatórias para todo desenvolvedor O.O. Por exemplo, muitos livros e cursos de O.O só retratam como características do paradigma, encapsulamento, polimorfismo, herança e abstração e esquecem de mencionar outras, também importantes, como covariância;
-
Fundamentals of Object-Oriented Design in UML - http://www.amazon.com/Fundamentals-Object-Oriented-Design-Meilir-Page-Jones/dp/020169946X/
-
Clean Code: A Handbook of Agile Software Craftsmanship - http://www.amazon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.Closeable; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.io.Serializable; | |
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cloudbus.cloudsim.examples; | |
import java.util.List; | |
import org.cloudbus.cloudsim.DatacenterBroker; | |
import org.cloudbus.cloudsim.DatacenterCharacteristics; | |
import org.cloudbus.cloudsim.Log; | |
import org.cloudbus.cloudsim.Vm; | |
import org.cloudbus.cloudsim.core.CloudSim; | |
import org.cloudbus.cloudsim.core.CloudSimTags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cloudbus.cloudsim.examples; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import org.cloudbus.cloudsim.Host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cloudbus.cloudsim.examples; | |
import java.text.DecimalFormat; | |
import java.util.ArrayList; | |
import java.util.Calendar; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////////////////////////////////////////////////////////// | |
static u_int64_t start = 0; | |
void access_counter(unsigned* hi, unsigned* low); | |
void start_counter() | |
{ | |
unsigned hi, lo; | |
access_counter(&hi, &lo); | |
start = ((u_int64_t)hi << 32) | lo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cloudbus.cloudsim.examples; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import org.cloudbus.cloudsim.Host; | |
import org.cloudbus.cloudsim.Log; | |
import org.cloudbus.cloudsim.Vm; | |
import org.cloudbus.cloudsim.core.CloudSim; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.cloudbus.cloudsim.examples; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import org.cloudbus.cloudsim.Host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This class provides access to the MQSeries queue facilities. Once | |
instantiated, the main application program need only call the 'send' and | |
'receive' methods to put & get strings. The send method returns an MQMessage | |
object the handle of which is used to retrieve the reply. */ | |
import java.io.*; | |
import com.ibm.mq.*; // Include the MQ package | |
public class MQCommunicator { | |
private String hostname; // Define the name of your host to connect to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example.types; | |
import java.util.Arrays; | |
import example.pattern.Observer; | |
import example.pattern.Subject; | |
public class Husband extends Person implements Observer { | |
private Person wife; |
OlderNewer