Better HN
topnewbestaskshowjobs
Log inSign up

voidlogic

3,297 karma · joined Nov 15, 2012 (14y ago) · 1,171 submissions

Submissions

comment 13y ago · link · parent

Exactly, save creationism for a world religions class and evolution for the science class. They cannot be compared in the context of science because creationism is outside of the scientific process.

This popular image says it all: http://punchkids.net/wp-content/uploads/2007/04/science_vs_f...

comment 13y ago · link · parent

I wish there were some examples- why is this better than "net/http" + Gorilla?

Why the focus on postgres? They talk about using a postgres driver that conforms to "database/sql". But that should mean you could use a mysql "database/sql" compatible driver like the one provided by mymysql (https://github.com/ziutek/mymysql), with no code changes to your project...

comment 13y ago · link · parent

`A spokeswoman for CBS Interactive said CNET retains editorial independence in covering "actual news."`

I'm sure nothing makes a tech reporter want to stay around like being told their reporting is not "actual news" and thus is not worthy of editorial independence.

comment 13y ago · link · parent

Nothing too unexpected, off the top of my head, I've noticed:

* Use Go tip; You can grab a snapshot review all the open issues for that snapshot (most are enhancements).

* Like any re-factor doing it sooner as opposed to later is less work :)

* Do some "from scratch" Go projects before doing re-factor projects to get your legs under you (if they are not already there)

* Write Go in Go, not C/Python/Java in Go. This is harder than you think when you get started, but, if you ask for help and people tell you you are fighting the system, carefully consider their advice.

* A lot of the Go community likes to use single letter variable names in contexts like receivers, struct state (just look at the stdlib), buck the system, don't do that, use short camel case names. The next guy / you in six months will be glad you did.

* If you have a Java/C++ background you might often write a single threaded version of a daemon and later multithread it later, this is generally an unnecessary step in Go.

* The Go versions really are not much larger (LOC)

* There is lots of useful Go code on github (don't be afraid to try them)

* If you are doing front-endy kind of stuff supplement "net/http" with Gorilla where needed whenever you can rather than rolling your own. ttp://www.gorillatoolkit.org/

* "go tool prof" is a great tool, know how to use it and its top20 / web commands. Even if you don't feel the pain, use it and you will learn what things you do are expensive and it will keep trouble from sneaking up on you.

* If you are using a SQL based store, use a driver that implements the interfaces in "database/sql" rather than providing its own interface. This will make your life very simple if you need to migrate between mySQL <-> Postgre, etc

* LiteIDE is a nice lean cross platform Go IDE that includes syntax highlighing, autocomplete (with gocode) and debugging support. The only think I had to do was write my own syntax highlighting theme, based on Solarized, because I thought the included ones were gross.

comment 13y ago · link · parent

In recent versions of Windows you are right about the exec perm and run as admin prompt existing.

"The downside is the user is prompted in a manner that allows them to override this."

Exactly right. Since both of those prompts are "click OK to continue" types it makes the barrier they present is much lower than Linux where you have to change a file permission, then type your password again (and probably from a terminal to use sudo). I would say the barrier is so low they seldom work from what I have seen.

My family members who run Linux don't even know how to use sudo... they just use the Ubuntu software center/synaptic.

"in fact we've seen some for the bsd based OSX last year" I have not used OSX in 4 years so I can't comment meaningfully on this. My gut tells me Apple probably takes a lower barrier approach like MS, but I don't know.

comment 13y ago · link · parent

People often say this, there are a lot of complicated technical reasons this is not true, leaving those aside, here are two very simple ones:

1. You download virusBin in Linux, you cannot run it- it does not have execute permission by default.

2. OK so either graphically or at the terminal (chmod u+x) you make virusBin executable.... (I'm not sure why you did this...) If you run it, all of its access outside of /home/$USER is read-only, the system and other users are safe, maybe your data is not.

So if you really want to mess up your machine 1. Download virusBin 2. Give virus Bin execute permission 3. Assuming you are the systems admin, you can now run it as root... sudo ./virusBin..

To get a user to do all that it is going to take a LOT of social engineering.

comment 13y ago · link · parent

"Also, C is not the only language worth rewriting in" Agreed!

I would really like to see someone write a node.js and Go back-end for the same front-end and do a head to head comparison.

As someone who spent a fair amount of time rewriting node.js prototypes in Go, I'm probably biased. I feel like javascript is a much less maintainable language. Perhaps is was the original node.js implementations (I don't think it was), but the Go versions were always faster, used less memory and IMHO were more readable.

comment 13y ago · link · parent

I feel like I understood it, but it is hard to put into words. I find that strange.

Emotionally it is easier to explain: It makes me feel like I did after the first time I watched American Beauty, read The Yellow Wallpaper, or listened to Bush's Razorblade Suitcase start to finish. Surreal maybe.

Perhaps in this case understanding is more emotion than cognition?

comment 13y ago · link · parent

Interesting Read: "Bostonian of the Year: Carmen Ortiz"

http://www.boston.com/news/local/massachusetts/articles/2011...

comment 13y ago · link · parent

"How about instead of criticizing people's eductions, we encourage them to be mindful about what they don't know, and to learn whatever they can when they get a chance?" I'm all for people learning things they were not taught in school and I commend you for that.

But as the field grows there will be more and more material that was traditionally taught, but is now dropped. For example, I could imagine a misguided department dropping a once required OS/Systems class to allow students to choose that as an elective, or maybe a node.js or Ruby elective instead. I think those kind of program changes are serious and need discussion-

comment 13y ago · link · parent

I'm sure you will see it before you graduate, whenever you take your basic operating systems course.

comment 13y ago · link · parent

My point was that a semaphore is freshmen or sophomore level undergrad stuff, something I would expect every professional developer to understand. Here someone who considers themselves a developer, which I assume means a professional software developer, considers it an exotic construct. Things like this shakes my faith in the computer science educational system.

comment 13y ago · link · parent

"I was worried that I’d have to resort to semaphores or some kind of other exotic programming construct."

I'm not saying a semaphore would have been appropriate here but- For real? A semaphore is exotic? It is an one of the oldest original synchronization methods. Semaphore were developed by Dijkstra in 1965. The author's C-S program failed him.

comment 13y ago · link · parent

This is stupid; do nothing and people will learn to adjust.

I actually like the idea of a city with less noise pollution. I would be more in favour of cars with proximity sensors auto-honking in preference to this non-sense.

Remember, look both ways before crossing the street kids...

comment 13y ago · link · parent

Its often worked out well to write the 10% most CPU bound parts of large Java or PHP applications in C. C defiantly has its place.

I wonder if this gentlemen has tried Go? If he is a big C fan, Go might be a great choice for the other 90%. Not only is Go a safer version of C with lots of great modern features, it integrates very well with C via cGo.

If memory usage and speed are your preeminent concerns, C is certainly a force to be reckoned with: http://benchmarksgame.alioth.debian.org/u64q/which-programs-...

comment 13y ago · link · parent

I agree about the great tools, I have used them.

But for being so simple Go gives you a lot of tools as well: http://golang.org/pkg/runtime/pprof/ http://golang.org/pkg/net/http/pprof/ http://blog.golang.org/2011/06/profiling-go-programs.html Go also has gdb support I used from my IDE (http://golang.org/doc/gdb)

comment 13y ago · link · parent

Yeah- that is great as long as you don't care about using 30x times more memory.... The awesome bloat cough I mean power of the JVM in action.

Go vs Scala: http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...

It will be interesting to re-visit this when Go 1.1 is out as well. Go being even younger than Scala has a lot of low hanging optimization fruit. :)

P.S. If Go didn't exist I would still be using Java/C#/C/C++ for everything. (I still use Haskell/Prolog where needed)

comment 13y ago · link · parent

I love Go for many of the same reasons as the author. Go's fantastic performance doesn’t' hurt either. :)

These micro-benchmarks match what I have seen in the real world:

http://benchmarksgame.alioth.debian.org/u64q/which-programs-...

comment 13y ago · link · parent

I can't say for sure- but I would guess that it would be normal for a lot of HN articles to go over your head if you are not technical or lack a C-S degree.

comment 13y ago · link · parent

The features described are nice, but are they nice enough to make up for Scala often using more memory than Java and being a bit slower?

One data point: https://docs.google.com/open?id=0ByTAIYFOarh0cm9aSXlzc0NWaXc

It is always about trade-offs, but you had the above with the much smaller functional language talent pool and I don't think I would want to use this are a core/shop language. If I was going to go functional, I think I'd go for Haskell GHC and get the functional lang benefits with better than Java performance.

Scala is definitely a good alt. lang for a Java shop though :)

comment 13y ago · link · parent

Is there a Diaspora spec / pod-to-pod API spec so people can write other interoperable implementations that are compatible with the current Ruby one?

comment 13y ago · link · parent

Most shops that use a compiled language like Go take advantage of the fact that they do not need to take the risk of storing source code on production hosts.

The deploy process is most likely an scp or git pull, etc from a binary/asset repo. Go binaries are statically linked to you have no dynamically linked libraries (.so/.dll files) to worry about either.

If you have the binary you don't need to use "go run" which is a compile and run, just run it (nohup ./myProgram &) or run it with which whichever supervisor script/daemon/etc you use for other services.

comment 13y ago · link · parent

Side note, duck typing is not inherently slow. Some people assume since many duck-typed languages are slow that there is some causation going on.

Go is way faster than Ruby and extensively uses duck typing everywhere (but is also statically typed and not interpreted-). My point is duck typing is not the reason Ruby is so slow.

comment 13y ago · link · parent

My previous link is a more general performance comparison across many languages. I realized upon re-reading that you were more interested in concurrency/scaling, this might be more what you are looking for: http://eric.themoritzfamily.com/websocket-demo-results-v2.ht...

comment 13y ago · link · parent

If you do this comparison and are doing performance testing yourself, make sure to test the scaling. At low concurrent connection counts I find their request handling latency to be pretty similar, but I have found Go scales much better.

Also, another factor (and different type of scaling), is how big the test app is. Go is for the most part written in Go (stdlibs etc). But in node.js,which is mostly C under the hood, as the app gets larger and larger and the ratio time spent in C vs JS changes to favor JS, things can take a downhill turn.

Enough said: https://twitter.com/felixge/status/275320642059001857

comment 13y ago · link · parent

This is an extremely simple comparison, but unless you are really pushing to garbage collector in go 1.0.3 these results are pretty typical across the board: https://docs.google.com/open?id=0ByTAIYFOarh0cm9aSXlzc0NWaXc

Go tip (aka 1.1 alpha/in progress) is even faster!

comment 13y ago · link · parent

I think the way go handles unicode is very sane- of course two of the three primary creators of Go, Ken Thompson and Rob Pike, are the same two co-creator's of UTF-8, so that is probably unsurprising.

Take a look at the Go spec: https://golang.org/ref/spec And std libs: https://golang.org/pkg/

comment 13y ago · link · parent

This all makes me very happy I program in Go day to day.

comment 13y ago · link · parent

Very?

If I consider the math courses I took in college undergrad (I was a C-S major) there are some that are useful in everyday day life like pre-Calc (aka. algebra + trig) when I build a new deck or figure out how much grass seed to buy. Others courses such as Calc I and II are useful in understanding the issues and trends around me, both business and political. But the vast majority are valuable to me every day as I work on systems software: Mathematical Logic and Discrete Math, Graph Theory, Linear Algebra with Differential Eq & Intro to the Theory of computation.

How can you not think Mathematics is important to tech?

comment 13y ago · link · parent

That is pretty scary (and possibly true). If a hacker does not have basic C competency, they probably do not understand how their code, C or otherwise is executed...

I'm all for C-S programs having a focus on teaching how to learn, frameworks of understanding and theory, but there need to be a few practical lessons along the way, and C competency is one of those.

Maybe things have changed greatly since my undergrad but, the capstone of my undergrad C-S program was writing a C(lite) compiler for MIPS in C. This is in a program where for 60% of the classes the language in use was Java. I think this was a fantastic capstone choice.

Students were expected to have deep understanding of C and Java and a working knowledge of Scheme, Haskell, Prolog with HTML/CSS/Javascript never taught due to the expectation you teach them to yourself on the way like everyone else. Depending your electives you might have also picked up C#, Python and Objective-C.

1
3637383940