As Kyle brought up, Consul at the moment has a single known case of a potential inconsistency (Could be unknown cases lurking). Currently Consul works by electing a leader, who "leases" the position for LeaderLeaseTimeout interval. At each interval, it checks that a quorum of nodes still believes it to be the leader. At the same time, if a follower does not hear from the leader within randomInterva(HeartbeatTimeout, 2 * HeartbeatTimeout), it will start a new election.
# Build arguments for the gn build | |
# You can set these with `gn args out/Default` | |
# ( and they're stored in src/out/Default/args.gn ) | |
# See "gn args out/Default --list" for available build arguments | |
# component build, because people love it | |
is_component_build = true | |
# release build, because its faster | |
is_debug = true |
package main | |
import ( | |
"fmt" | |
"github.com/codegangsta/negroni" | |
"github.com/julienschmidt/httprouter" | |
"net/http" | |
) | |
func main() { |
# Ubuntu upstart file at /etc/init/ejabberd.conf | |
respawn | |
respawn limit 20 5 | |
start on runlevel [2345] | |
stop on runlevel [06] | |
script | |
exec start-stop-daemon --start --name ejabberd --user ejabberd --chuid ejabberd --exec /usr/local/sbin/ejabberdctl -- start |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"strconv" | |
"time" | |
"github.com/octplane/mnemo" | |
) |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
function hexToBase65536(hex) { | |
var result = ""; | |
for (var i = hex.length ; i > 0; i -= 4) { | |
result += String.fromCharCode(parseInt(hex.substring(i - 4, i), 16)); | |
} | |
return result; | |
} |
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"io" | |
) |
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".
package main | |
import ( | |
"github.com/codegangsta/martini" | |
"github.com/codegangsta/martini-contrib/binding" | |
"github.com/codegangsta/martini-contrib/render" | |
"labix.org/v2/mgo" | |
) | |
type Wish struct { |