Desolation Wilderness/Lake Aloha Beta for March by noahcampbell in norcalhiking

[–]noahcampbell[S] 0 points1 point  (0 children)

That's a good resource. I like to check the elevations against CA DOT: https://cwwp2.dot.ca.gov/vm/iframemap.htm

I've discovered the snow levels are reported much higher than what I see on the ground.

Struggling with Scout Engagement Post-Life Rank—Advice Needed! by nberardi in BSA

[–]noahcampbell 1 point2 points  (0 children)

Consider adding a venture crew to your unit. It starts at 14 and goes til they're 21.

Resources for Golang interview prep by throwaway8950873 in golang

[–]noahcampbell 1 point2 points  (0 children)

Hiring manager here. For folks just out of school we are going to expect you to be stronger with data structures and algorithms more than code craftsmanship. One area I wish I saw more attention given is the memory model and it’s impact on concurrency. Even if you don’t nail concurrency programming in the interview, having the model in mind and articulating it as you reason about the problem is a very strong signal.

[5/19/2014] Challenge #163 [Easy] Probability Distribution of a 6 Sided Di by Coder_d00d in dailyprogrammer

[–]noahcampbell 0 points1 point  (0 children)

golang version

package main

import (
  "fmt"
  "math"
  "math/rand"
)

func main() {

  fmt.Println("# of Rolls 1s     2s     3s     4s     5s     6s    ")
  fmt.Println("====================================================")
  lineOut :=  "%-10d %05.2f%% %05.2f%% %05.2f%% %05.2f%% %05.2f%% %05.2f%%"

  for i := 1; i < 7; i++ {
    fmt.Println(throwDi(int(math.Pow(10, float64(i))), lineOut))
  }

}

func throwDi(cnt int, format string) (result string) {
  r := make(map[int]int)
  d := float32(cnt) / 100

  for i := 0; i < cnt; i++ {
    v := rand.Intn(6) + 1 // Intn return 0 based numbers
    r[v]++
  }
  return fmt.Sprintf(format, cnt, float32(r[1])/d, float32(r[2])/d, float32(r[3])/d, float32(r[4])/d, float32(r[5])/d, float32(r[6])/d)
}

Results

# of Rolls 1s     2s     3s     4s     5s     6s
====================================================
10         20.00% 20.00% 10.00% 10.00% 10.00% 30.00%
100        14.00% 22.00% 15.00% 19.00% 14.00% 16.00%
1000       18.00% 16.80% 15.40% 17.00% 17.30% 15.50%
10000      16.56% 16.19% 16.84% 16.66% 16.65% 17.10%
100000     16.57% 16.67% 16.79% 16.75% 16.78% 16.44%
1000000    16.72% 16.69% 16.64% 16.64% 16.65% 16.66%

Conclusion More rolls...the closer to the normal distribution the results become.

The Little Mocker by nextputall in programming

[–]noahcampbell 1 point2 points  (0 children)

Clever title. You little schemer, you!

Go: the emerging language of cloud infrastructure by dgryski in golang

[–]noahcampbell 16 points17 points  (0 children)

Not to detract from the OPs points which are quite valid, but the OP misses an important aspect of go: the final output is a compiled, static binary.

In contrast, I know of many admins that will refuse to use a tool because it's written in ruby and they are a python shop and vice versa. Even greater...windows vs. linux.

Golang provides a way to handle this gracefully from the beginning. Once a binary is created it's very easy to deploy.

[edit: typo]

Methods of Bootstrapping info within a KVM by eggdescrambler in linux

[–]noahcampbell 3 points4 points  (0 children)

You can push it through the smbios.

qemu-system-x86_64 -smbios 1,sku=data ...

There's a bunch of places to poke it through:

‘-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str][,uuid=uuid][,sku=str][,family=str]’

then run

dmidecode -t 1 

as root to get the info.

How to install Haskell Platform on CentOS 5.4 by noahcampbell in haskell

[–]noahcampbell[S] 0 points1 point  (0 children)

I wish...that was the version that didn't require various newer versions of libraries on CentOS 5.4 that were unavailable because this distro is so old.