3,297 karma · joined Nov 15, 2012 (14y ago) · 1,171 submissions
comment 13y ago · link · parent
This popular image says it all: http://punchkids.net/wp-content/uploads/2007/04/science_vs_f...
comment 13y ago · link · parent
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
* 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
"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
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
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
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
http://www.boston.com/news/local/massachusetts/articles/2011...
comment 13y ago · link · parent
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
comment 13y ago · link · parent
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
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
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
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
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
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
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
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
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
comment 13y ago · link · parent
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
Go tip (aka 1.1 alpha/in progress) is even faster!
comment 13y ago · link · parent
Take a look at the Go spec: https://golang.org/ref/spec And std libs: https://golang.org/pkg/
comment 13y ago · link · parent
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
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.