Live data from Hacker News

Joel Spolsky is doing an IAmA on reddit

reddit.com

41–50 of 54 posts

Re: Joel Spolsky is doing an IAmA on reddit

#41

I really want to learn C, like he says. I get plenty done without knowing it, and I have few doubts I can continue to find decent work without knowing it, but I haven't been able to gain any traction when I try to learn it. I've got the books sitting front of me, and I've written some trivial visualizations of sorting algorithms using terminal output, but damn if I can find a way to use C as a web developer. If there…

For years as I developed with Python and Javascript I thought "I really should write something in C again and maybe I should learn some C++". But nothing I was doing was performance critical or low level enough that I needed C or C++. Then, a funny thing happened and I started playing with the Arduino. And, while they go to great pains to hide it from non-technical people, the whole Arduino stack (ignoring the IDE) i…

You can take slightly larger leap, and program the Arduino processor directly, without using the Arduino abstraction. It's the next logical leap, as "industry" doesn't really use the Arduino platform.

Re: Joel Spolsky is doing an IAmA on reddit

#42

I really want to learn C, like he says. I get plenty done without knowing it, and I have few doubts I can continue to find decent work without knowing it, but I haven't been able to gain any traction when I try to learn it. I've got the books sitting front of me, and I've written some trivial visualizations of sorting algorithms using terminal output, but damn if I can find a way to use C as a web developer. If there…

Write a LISP interpreter? :-) This was the final project in the C class I took in college. It's not a bad idea.

Heh, the only thing I have ever written in C was a Lisp interpreter :) I learned some C and Lisp at the same time, so it was a valuable exercise.

Re: Joel Spolsky is doing an IAmA on reddit

#43

Every time you feel like you've made the world better by upvoting a story about injustice, you're just making yourself feel smug. Forget the upvotes... go work on making the world a better place. He was writing about how stories of social injustice get a ton of upvotes, but nobody actually goes out and does anything to fix the situation. I'm sure there's a lesson here for HN.

Pertinent quote:

"I defend the value of "not caring about 90% of stuff" Care deeply about everything == accomplish nothing." - John Carmack

Re: Joel Spolsky is doing an IAmA on reddit

#44

Earlier quoted context omitted.

I hear you, but adding or fixing a feature in Python/Ruby/Perl doesn't ever come up for me. Does it for you? Plus, I understand that much of the standard libraries are written in the high level language.

See if you can find some bottleneck in one of your Python/Ruby/Perl apps that's chewing a lot of CPU time. See if you can devise a definition for a relatively simple function that if it was REALLY FAST would make this hot spot a lot more efficient. Then implement that function in C and expose it to the high level language. It might not be a good idea to actually use your fast C function in production (if you're new a…

> See if you can find some bottleneck in one of your Python/Ruby/Perl apps that's chewing a lot of CPU time.

I found that hard to do as a starting developer who didn't know what was actually a bottleneck in my code, but I did have a particular library/gem that I wrote myself that did a few things I constantly needed (think of authentication in a web app, it's almost always included). So I rewrite it in C. It didn't really make it faster, or better, but I learned a bunch of C.

Re: Joel Spolsky is doing an IAmA on reddit

#45

He mentions how functional programming is valuable, something that many graduates are lacking in. Does JavaScript count as a functional language?

If you really want to learn functional programming, you are better off trying something that at least makes you go out of your way to code in a non-functional style. Anywhere from all the way off the deep end with Haskell to Clojure and F# being good choices from personal experience.

Re: Joel Spolsky is doing an IAmA on reddit

#46
post #27

Every time you feel like you've made the world better by upvoting a story about injustice, you're just making yourself feel smug. Forget the upvotes... go work on making the world a better place. He was writing about how stories of social injustice get a ton of upvotes, but nobody actually goes out and does anything to fix the situation. I'm sure there's a lesson here for HN.

Can anyone argue that the time spent upvoting a reddit story of injustice provides negative net value to the world?

Yvain wrote about this on Less Wrong. He described a study that showed that people who had just done one good act were less likely to do another: http://lesswrong.com/lw/1d9/doing_your_good_deed_for_the_day...

"All those biases that lead people to give time and money and thought to causes that don't really merit them waste not only time and money, but an exhaustible supply of moral fiber"

Re: Joel Spolsky is doing an IAmA on reddit

#47

Earlier quoted context omitted.

If you have read the K&R C book I am not sure you would say that. It's great no matter what you do with it.

That's a bizarre thing to say. Do you think the K&R book is a great way to learn French?

No offense but are you just being obtuse? Clearly I meant something other than what you are suggesting.

Re: Joel Spolsky is doing an IAmA on reddit

#48
post #40

Earlier quoted context omitted.

I notice this in politics. Some people vote for charitable political parties, while they themselves never give to charity.

This actually makes sense in politics, because a successful party can exercise charity on your behalf using tax money. It's the "Swedish model" -- there private charity is rare, but public welfare and development aid is generally accepted and supported by voters.

It works as a stable multi player multi round prisoner's dilemma.

Basic strategy "always defect until everyone agrees not to while voting that everyone not defect."

Re: Joel Spolsky is doing an IAmA on reddit

#49

Earlier quoted context omitted.

So, if you're a web developer, you probably use Perl, Python, Ruby, or some similar language. Guess what, these are written in C(+). When you need to add or fix a feature, guess what language you use? (+) Yes, yes, programming languages are not written in anything. Their implementations are. I know you know what I mean.

I hear you, but adding or fixing a feature in Python/Ruby/Perl doesn't ever come up for me. Does it for you? Plus, I understand that much of the standard libraries are written in the high level language.

I have not needed to add or fix a feature in a programming language but I have needed a ruby gem that uses native extensions (written in C) that are not available for my environment. I know enough C, but I have no idea how to implement this so I can't use it. Thus, instead of calling a few functions in a library I literally have to install another version of ruby, wrap the gem in some high level API, and expose the service via Sinatra, and call it via Net::HTTP. Not fun.

Particularly, libraries search their catalogs using the z39.50 protocol. Ruby 1.8 has a gem ruby-zoom[0] that does this using YAZ[1] however there is not a ruby 1.9 version. If anyone has a guide that explains native extensions for Ruby, please advise.

[0] http://ruby-zoom.rubyforge.org/ [1] http://www.indexdata.com/yaz

Re: Joel Spolsky is doing an IAmA on reddit

#50

Earlier quoted context omitted.

I don't think sufficient understanding of how computers work can come from just reading a book. If it could, you should read a book about how computers work, instead of trying to glean that through the lens of C programming. Understanding comes from doing.

If you have read the K&R C book I am not sure you would say that. It's great no matter what you do with it.

Personally, I don't agree. I think a majority of the value of K&R actually comes from the exercises.

K&R gives you a very good, clear and detailed explanation of the topic at hand and then immediately gives you several exercises to practice it. If you don't do the exercises the information will just fall out of your short-term memory whereas if you actually do them your long-term memory will get engaged as well as general muscle-memory for C coding.

Post reply on HN