Skip to content

Instantly share code, notes, and snippets.

Mastering Programming - by Kent Beck

From years of watching master programmers, I have observed certain common patterns in their workflows. From years of coaching skilled journeyman programmers, I have observed the absence of those patterns. I have seen what a difference introducing the patterns can make. Here are ways effective programmers get the most out of their precious 3e9 seconds on the planet. The theme here is scaling your brain. The journeyman learns to solve bigger problems by solving more problems at once. The master learns to solve even bigger problems than that by solving fewer problems at once. Part of the wisdom is subdividing so that integrating the separate solutions will be a smaller problem than just solving them together.

Time

Slicing - Take a big project, cut it into thin slices, and rearrange the slices to suit your context. I can always slice projects finer and I can always find new permutations of the slices that meet different needs

def submitGoogleRequest(RecordBean record, String callback_headers) throws IOException {
String query = "${record.getName()} ${record.getCompany()} ${GOOGLE_QUERY_SUFFIX}"
final URI google_uri = new URIBuilder()
.setScheme("https")
.setHost(GOOGLE_URL)
.setParameter("q",query).build()
final URI uri = new URIBuilder()
.setScheme("https")
@emmanuj
emmanuj / atom_clojure_setup.md
Created December 4, 2018 14:35 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

// ===== Deleting pointers in a container.
//To delete a dynamically allocated pointer in c++
delete ptr;
// To delete pointers in a vector e.g
std::vector<Frame*> frames; //previously created vector
for ( unsigned int i = 0; i < frames.size(); ++i ) {
delete frames[i]; // ExplodingSprite made them, so it deletes them
}
package net.hausherr.sample;
import org.apache.http.client.CookieStore;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.conn.routing.HttpRoutePlanner;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;