Shanghai Building to be Demolished

Technology

June 19th, 2013

In Technology

No Comments

Social Networks of the American Revolution

Interesting:

Rest assured that we only collected metadata on these people, and no actual conversations were recorded or meetings transcribed. All I know is whether someone was a member of an organization or not. Surely this is but a small encroachment on the freedom of the Crown’s subjects. I have been asked, on the basis of this poor information, to present some names for our field agents in the Colonies to work with. It seems an unlikely task.

If you want to ...

Read More Source

June 3rd, 2013

In Technology

No Comments

Why is Github asking me for a username and password?

This is an important tip about ssh and Github. I redid my ssh keys like 5 times before I finally found out what the real problem was.

A common mistake is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking the ssh button left to the URL field and updating the URL of your origin remote like this:

git remote set-url origin git@github.com:username/repo.git

Source

May 28th, 2013

In Technology

No Comments

Why use the REPL when doing Clojure development?

This conversation is good. Some highlights:

There are two phases which seem, in java land at least, to get conflated.

1. Poking an API to learn it’s capabilities and behaviour. 2. Writing tests to prove the correctness of your use of the API.

These are quite different phases, each important in their own way

1. is the ‘kicking the tyres’, open the bonnet, boot etc when you’re looking at car to see if it’s what you want to buy.

2. is the MOT, looking at ...

Read More Source

May 16th, 2013

In Technology

No Comments

Object oriented programming does not work

The most abstracted and de-coupled and object-oriented framework that I have worked with is Symfony, and it is also the framework that has broken backwards compatibility the most often, during the last 5 years. I started working with Symfony in early 2008, and it has been constantly refactored during that time, and each refactoring has broken something important.

It is difficult to explain why I dislike Symfony so much. For awhile I would have said it was their envy of ...

Read More Source

May 16th, 2013

In Technology

No Comments

What is my public IP address

My co-worker Erick sends me this:

Yea, if you go to ifconfig.me you get all sorts of info from the view of the internet. You can even get the info from command line. For example curl ifconfig.me/ip will give you the public IP address (See the Command Line Interface section from the website).

However do note, that this IP address represents the Internet address for the entire office. If a specific server should only be allowed to access a ...

Read More Source

May 14th, 2013

In Technology

No Comments

How to setup Nginx, PHP-FPM and APC on a Mac

This tutorial is good. I am now sad that I wasted days finding this information in scattered places, because this one tutorial brings it all together in one place. I am going to link to it in the hopes that Google will rank it more highly in the future.

Source

May 14th, 2013

In Technology

No Comments

Why does anyone use PHP for anything?

I was a fanatic proponent of PHP, back around 2000. If I wanted to build a website, I could use Java or Perl or PHP. The choice was straightforward. Java was complex, and any change demanded that the code be recompiled. Perl had a small core and a million libraries that you needed to bundle in, so it was a little bit like Java in that you had to assemble a lot of different pieces. PHP was a light weight, ...

Read More Source

May 9th, 2013

In Technology

No Comments

How to setup your database at AWS to work with Heroku

Spent some serious time trying to track down this answer. My company has a Sinatra app running via Heroku. I just started working at a new office that has never had access to these apps. How do I whitelist my IP address so I can reach the AWS server and run a command like mysqldump? Can I do that via the Heroku toolset? No. Apparently I need to log into the AWS console. These are useful resources:

Connecting Your ...

Read More Source

May 6th, 2013

In Technology

No Comments

How to restore MongoDb from backups

This is a great post on how to restore MongoDb from backups.

Source

May 4th, 2013

In Technology

No Comments

The dev-ops anti-pattern

A friend sends me this in an email:

The unfortunate bit is that IMO, the DevOps role was created to handle the headache part, so the engineers can spend more time doing the fun parts.

This is an anti-pattern. When your company does this, it is making a mistake.

Source

May 3rd, 2013

In Technology

No Comments

max_allowed_packet and Heroku

This killed a whole day for me. I kept running:

heroku db:pull –app ny-offers

I needed a local copy of this database. The download would get halfway and then die:

I did some research and decided the problem was net_read_timeout or net_write_timeout in MySql. So I adjusted both:

set @@net_write_timeout = 1800;

set @@net_read_timeout = 1800;

That didn’t help.

So then I thought I could use mysqldump. I followed the directions in that post. But my IP was not whitelisted so I was not allowed ...

Read More Source

May 1st, 2013

In Technology

No Comments

One language for the frontend, backend, and the database?

Interesting:

First of all, there are huge advantages to using a uniform language throughout your stack. My team uses a set of tools that we affectionately call the MEAN stack:­ MongoDB, ExpressJS, AngularJS, and Node.js. By coding with Javascript throughout, we are able to realize performance gains in both the software itself and in the productivity of our developers. With MongoDB, we can store our documents in a JSON-­like format, write JSON queries on our ExpressJS and NodeJS based server, ...

Read More Source

May 1st, 2013

In Technology

No Comments

Clojure as a Javascript generator

I am surprised by the continued rise of Javascript, a somewhat flawed language that has now become a universal target for dozens of other languages. I am stunned by the thought that creating Javascript might become the “killer app” that brings Clojure into the mainstream.

I was highly resistant to learning ClojureScript, but I want to experiment with LightTable, so I guess I need to learn ClojureScript (which I gather is the language for writing plugins for LightTable).

Source

April 26th, 2013

In Technology

No Comments

Clojure is immutable — what this really means

Damn, this is great:

Here’s the difference:

# python def foo(): x = 23 y = lambda: x x = 44 return y

print foo()()

# ruby def foo(): x = 23 y = lambda { x } x = 44 y

puts foo.call

// javascript var foo = function(){ var x = 23; var y = function(){ return ...

Read More Source

April 25th, 2013

In Technology

No Comments

Jay Fields cuts to the important stuff

I have started using Expectations, which is a testing system created by Jay Fields. I really like Expectations. It is very minimalist, which I like a great deal.

Source

April 23rd, 2013

In Technology

No Comments

How to restart your server processes when they die

A great writeup of several different process managers, that help with daemonization and restarts:

Monit is an established player in the process management game. Its sole purpose is to monitor daemon processes, files, directories, filesystems, etc on your server and respond with appropriate actions whenever something is not as it should be.

Sample

Here’s a simple configuration to monitor an SSH server daemon process:

1 2 3 4 5 6 set daemon 60 #check interval in seconds

check process ssh with pidfile “/var/run/sshd.pid” start ...

Read More Source

April 23rd, 2013

In Business, Technology

No Comments

Why is it so difficult to estimate time on software projects?

I just went through something just like this. Interesting:.

It was the , and I was a young developer 1. In college, I had aced coding exercises, as a junior dev I had cranked out code to solve whatever problems someone specified for me, quicker than anyone expected. I could learn a new language and get productive in it over a weekend (or, so I believed).

And thus, in the natural course of things, I got to run my own project. ...

Read More Source

April 23rd, 2013

In Technology

No Comments

Use JConsole to debug JVM apps

Haven’t needed to do this yet but at some point I will.

Source

April 23rd, 2013

In Technology

No Comments

You can debug a running process

GDB lets you tap into a running process and see what is happening with your app, while your app is live.

That includes stuff like running Ruby or Python processes.

Source

April 17th, 2013

In Technology

No Comments

A simple example of a one-function for encoding

Interesting:

Alice and Bob are crossword enthusiasts. Every morning they rush to complete the Daily Telegraph cryptic crossword. One morning Alice finishes the crossword and telephones Bob to gloat. Bob challenges her by asking for the solution to 21D as proof that she’s completed the entire thing.

Alice knows the answer (FOLIO) but doesn’t want to tell Bob because that would give away an answer that Bob might not yet have. And she knows that Bob may ask her for more solutions ...

Read More Source

April 17th, 2013

In Technology

No Comments

ClojureWerkz now accepts donations

I just sent them $100. I am wholly reliant on Monger for everything I do at this point.

ClojureWerkz was started in mid-2011 because we were frustrated with a couple of database and messaging libraries that were very popular in the Clojure community at the time. We were also frustrated with the “culture” of not documenting projects. So developed a library the way we wanted. Then another one. And another one. Today, we find ourselves with dozens of projects that ...

Read More Source

April 17th, 2013

In Technology

No Comments

The attitude of the Clojure community

Interesting:

“enterprise” in general is extremely conservative about change. Those companies use Java because it’s “safe”: it’s pretty much ubiquitous, it’s been around for decades, it’s easy to hire low-to-mid-range developers, you can outsource it relatively easily. If you have a company that’s bought into the whole Java stack and uses Java for “everything”, you have a deeply entrenched company and it may be extremely difficult to bring Clojure in. You might have some success bringing Scala in – as a ...

Read More Source

April 17th, 2013

In Technology

No Comments

How to export files from MongoDb GridFS

by Vladimir Momirov: This is an awesome script:

The biggest problem is that I used GridFS to store uploaded files. After unsuccessfully searching online I decided to write my own bash export script. How to export all the files out of mongodb gridfs? Here’s the script:

#! /bin/bash _host=”${1:?Usage: gridfs host db}” _db=”${2:?Usage: gridfs host db}” while read -r line; do file=$(echo “$line” | awk -F’\t’ ‘{ print $1 }’) [[ $file == 'connected to'* ]] && continue ...

Read More Source

April 16th, 2013

In Technology

No Comments

Lukasz Wrobel on Ruby cache systems

This is a very good write up by Lukasz Wrobel, about different cache techniques.

Instead of mixing cache logic into your methods, try to wrap method calls with cache handler. This shouldn’t be difficult, especially in view of some nice Ruby’s features.

Let’s wrap method call with a block like this:

posts = cached(‘posts’) do get_posts() end

It looks much more cleaner than the previous example, but when does the caching and retrieving data from cache takes place? Let’s try to implement the ...

Read More Source

April 11th, 2013

In Technology

No Comments

The cult of credentials

Interesting:

On the podcast, Kling explains his colleague Bryan Caplan’s point of view, saying that going to college signals conformity to organizations that want you to be a conformist in order to work there:

“If you’re bright enough and conscientious enough to go to college but you don’t, you’re signaling that you’re willing to be different, that you don’t accept the norms of society. So, as an employer, I’ve got to worry. Sometimes you have to do something that doesn’t make sense ...

Read More Source

My name is Lawrence Krubner. I run WP Questions .


RECENT COMMENTS

January 10, 2012 1:09 pm

From lawrence on Fred Dewey is misunderstood

"Thank you, Charlotte. But what is the main advantage of Kachingle for you? You could perhaps find a more direc..."

January 9, 2012 2:29 pm

From Charlotte Monte on Fred Dewey is misunderstood

"I love your thoughtfulness and tone, however, I have questions about the "Community" of voters you mention. I ..."

December 14, 2011 10:58 am

From Lawrence Krubner on Fred Dewey is misunderstood

"Thank you all. I look forward to seeing the emergence of an innovative startup that is able to find the new mo..."

December 14, 2011 9:25 am

From Barbara on Fred Dewey is misunderstood

"Thank you, Lawrence, for that insightful and balanced review. I am a Kachingler, and I support its business m..."