Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zedshaw
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
zedshaw
9y ago
Someone linked me here asking me how I can write good quality code so fast so I thought I would come and drop a comment just in case other people read this and fall prey to the "HN must be true" virus. I have no idea if I write co
2.
▲
by
zedshaw
9y ago
LOL. An account with these as the only comments and no submissions? Man this place is so weird. It's like you're at a party, and then some guy can scream at you from across the room while wearing a Richard Nixon mask and everyon
3.
▲
by
zedshaw
9y ago
How to See Color and Paint It -- It taught me how to see color and paint it. Also how to use a palette knife which makes my paintings very different and fun. Remembrance of Things Past -- I'm still reading this, as it's a massive
4.
▲
by
zedshaw
11y ago
The man who moved my book into the "avoided" category admitted to me in an email that he did it just because of my K&R critique, not because of the book's quality, is not a C programmer, hasn't coded C professionally
5.
▲
by
zedshaw
11y ago
For reverse engineering? You should use every single thing you can get your hands on that helps you learn. The K and R are the two people who wrote C. Of course you should read their if you want to learn C. Then read, and WRITE the code
6.
▲
by
zedshaw
11y ago
That's a rather slanderous thing to say, and I honestly wish programmers would quit this fear mongering of others in the profession. I do it too, but lately I've been saying that we need to stop it. You've never met me in pe
7.
▲
by
zedshaw
11y ago
This book is for people who don't know any programming. So let's catalog your claims in that light: 1. "no use of context managers when working with files" - I teach files early on, before they even know how to make a
8.
▲
by
zedshaw
11y ago
I have to serve the student's needs before any in the community, and there's a very practical reason for going with Python2: The vast majority of code out there is in Py2, so if someone learns Py2 first, they can start coding and
9.
▲
by
zedshaw
11y ago
Me too, man that book has been an epic slog. I've ended up rewriting it like 10 times but finally have a draft off to the publisher for editing. I'm still not totally happy with it, but it's the best I could possibly do. Th
10.
▲
by
zedshaw
11y ago
Yep, this is exactly right, although I'd say it almost totally teaches programming. The book definitely teaches computational thinking and gets people over that hump and into finally learning programming, but I need to work on a fol
11.
▲
by
zedshaw
11y ago
That's a good assessment of the books, and one I put into the introduction. It's weird because what is great for a beginner with zero knowledge is incredibly painful for someone who's experienced. I think that's the ke
12.
▲
by
zedshaw
11y ago
You're welcome. I honestly write the books for people like you, and thankfully the world of programmers and the world of regular people really doesn't intersect much.
13.
▲
by
zedshaw
11y ago
You're conflating internet interactions with real interactions. I don't drink at all. Never done drugs and have never been drunk or anything. When I go to bars with friends I find that as the night goes on people become complete
14.
▲
by
zedshaw
11y ago
I am contrarian and rude, but you most likely worship quite a few people in tech who are also contrarian and rude but you say nothing. I bet there's a CEO you admire who is even worse than me and you tout his words like they're a
15.
▲
by
zedshaw
11y ago
No, the relevant fact in RiaG is that DHH had been lying to people for years claiming that "rails scales" when he had to handle 400 restarts a day of his process. And then I was trying to be funny and shit.
16.
▲
by
zedshaw
11y ago
It's interesting that you'd use an anonymous account to sling some slander, but I'll answer you: Yep, that comment thread is great and people should read it for an explanation as to how completely insecure C is. It made me r
17.
▲
by
zedshaw
12y ago
> It's unsafe in exactly the same way that the unsafe copy() function is No, that's the logic error every programmer makes. The copy() function is always wrong, because it can't confirm that the string has the right len
18.
▲
by
zedshaw
12y ago
That'd be up to my publisher (A/W) but I do believe they roll out French versions of my book depending on market demand. How that demand happens I have no idea.
19.
▲
by
zedshaw
12y ago
Alright, I did finally get this working. Pretty fucking awesome, I had not thought of that. Here's a version everyone can try: https://gist.github.com/zedshaw/64b3fb6b7ed653852619 I officially concede that becau
20.
▲
by
zedshaw
12y ago
Fail. I've ran it repeatedly over and over and it doesn't run forever. It segfaults or exits. But....you did cover a corner case I hadn't considered. Thanks! https://gist.github.com/zedshaw/81edf35857e
21.
▲
by
zedshaw
12y ago
Well this if fun folks, but frankly, you all have proven just how conservative programmers are. My chapter advocating something as "revolutionary" as including the lengths of strings when you process them has received more hate m
22.
▲
by
zedshaw
12y ago
Are we looking at the same code? I use an assert to quickly check for NULL, and this is a simple example of how to work with the function. Other parts of the book use more extensive error checking and I use my debug.h macros quite a lot, b
23.
▲
by
zedshaw
12y ago
You actually were an asshole first my friend. You came in with a comment that was rude, not insightful, and seriously uninformed and then announce how you're going to flag it as awful. Everything about what you wrote makes you an ass
24.
▲
by
zedshaw
12y ago
Alright my friend, here's the gist: https://gist.github.com/zedshaw/c20a69f17578909523c4 The rules: 1. You said you can make that for-loop run forever that can call it and it'll enter an infinite loop. 2. To
25.
▲
by
zedshaw
12y ago
Ahhh the "undefined behavior" trope, whereby a C "expert" who's memorized a standard trots out the abstract machine to justify his point. An abstract machine that doesn't actually exist and that no computer ac
26.
▲
by
zedshaw
12y ago
Curious, did you find a bug I'm not seeing? How do you think an alternative copy function that uses lengths would have buffer overflows?
27.
▲
by
zedshaw
12y ago
People are downvoting you, but as the author of this I can say you're right. Not necessarily lisp, but using any language that doesn't have the fatal flaw of totally broken strings is better. C is still a large historical influen
28.
▲
by
zedshaw
12y ago
I'm sure the people who wrote gotofail https://www.imperialviolet.org/2014/02/22/applebug.html would disagree with you on how "clearly" you can see those kind of braceless structures.
29.
▲
by
zedshaw
12y ago
I know, that's why I have these: http://c.learncodethehardway.org/book/ex20.html But, when talking about this I didn't want to muddy the waters with my own assert alternatives. Programmers have a hard enough
30.
▲
by
zedshaw
12y ago
I don't think you know what it means when someone asks whether a loop will terminate. It's an analysis of the logic of the loop to determine if it will exit. This kind of analysis has been the actual foundation of computer scien
More ›