You're Reading The World's Most Dangerous Programming Blog

You are not resetting the Stopwatch so EllapsedMilliseconds continues to grow with each Start/Stop

Many readers will take what you write as the last word in programming.

I do not think any programmer should ever do that for anything he or she reads, even if itā€™s Knuth. And I am far, far from Knuth.

I completely disagree Niyaz. A blog is an author expressing his or her thoughts/ideas, nothing else. If readers take what is written on a blog for a fact, well frankly that is not the authors fault.

Itā€™s as with every other type of media. Donā€™t believe it just because you read/hear it. Think for yourself.

Was the Happy Gilmore (as opposed to Billy Madison) reference a joke pointed at the misinformation youā€™re talking about? =)

Heh, you give me too much credit. Iā€™m not that clever. Fixed the post.

You are not resetting the Stopwatch so EllapsedMilliseconds continues to grow with each Start/Stop

Look more closely, or, try it yourself and see.

Hmmā€¦ I really donā€™t see how you can seriously compare a blog entry about a verifiable technical issue and a blog entry that can affect a personā€™s life and can only be validated over the course of a career.

Also, you didnā€™t pick the most salient criticism from the reddit discussion:
http://www.reddit.com/r/programming/comments/78vq3/jeff_atwood_finally_jumps_the_shark/c05zp1u

The thing with articles like this is, itā€™s basically boosterism for the term Marketing. It starts with the (shocking) claim that marketing isnā€™t so bad - actually we should all be good at it. Then it says, Actually by marketing we really mean basic communication skills, so donā€™t be frightened of this term marketing or of being good at it!

What irritates the shit out of me is that it conflates these two, falsely. What Atwood really means - what he can ONLY mean - in this conflation is that marketing is more important than programming in a programmer. Normal communication is not the same thing as selling yourself or selling what youā€™ve been up to lately. And the conflation is a totally Marketing attitude. To Marketing, everything is marketing. You know what guys? Itā€™s a good idea not to be a shrinking violet, and to have some conversation skills. And yes, the boundary between non-manipulative communication and manipulative communication is hazy. But telling programmers that they should all practice a more or less professional salesmanship, because they are (apparently) all social misfits, is insulting, and fucking annoying.

Tchami,
I will not take whatever written here for a fact; nor will you.
But that does not relieve Jeff from writing responsibly. This blog is high up in Google for many search terms and there are a lot of visitors to this blog. You cannot run away from that fact.

If Jeff can do something to stop WTF programmers from made, that is to write excellent programming articles that can be used as a fact rather than whining about the fact that this is ā€˜just a blogā€™.

ā€˜Just a blogā€™ applies to my blog where there are only a handful of readers. The ā€˜just a blogā€™ excuse cannot be used for a very popular blog like this for giving incorrect information.

Jeff, the point for me is revealed in this sentence of yours:

But, like any veteran internet user, I never take what I read on a blog ā€“ or any other site on the internet, for that matter ā€“ as fact. Rather, itā€™s a germ of an intriguing idea, a call to action.

Many many programmers (or internet users in general) believe what they see - without doing the investigation first. I disagree with Niyaz PK above - users who do not do the extra fingerwork to verify what they read will be burnt by their lazieness sooner or later - and thatā€™s a good thing. You can only write about what you know - even if in the due course of events that turns out to be incorrect. Scientists have been working this way for hundreds of years. To suggest that we (as bloggers) start writing about nothing but the absolute truth is patently absurd (besides, some people will argue that trut is subjective rather than objective).

Keep up the good work.

See what ? that the timings always increase because you do not /reset/ ? You do start and stop, but /reset/?

Jeff Atwood has always held the distinction of having the most dangerous programming blog ā€¦

The arrogant, angry and hysterical will always be with us. I hope so. Theyā€™re so CUTE!

Jeff,
Normally, it is the just the nature of media that people belive what they read,hear or watch. However, in your niche, people who are reading this blog, are genreally intelligent people, who should verify what they reas. Also a blog is meant to stimulate the thoughts, and should not be taken as absolute jugdement. Also, if you keep a lot of peopleā€™s interest in your mind, it kills the creativity.

Jeff, Iā€™ve seen quite a few comments/posts on Reddit bashing you lately.

Mostly itā€™s just people who need to get over themselves and realize they have better things to do with their time.

Iā€™ve often found your blog very educational, and your writing style pleasant too.

You bring up lots of topics that are useful reading, but might be unknown to many of your readers (like me).

As for all the bashing, I think should just ignore it all.

Besides, saying something like What youā€™ve just written is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought is just one of the most insanely idiotic things Iā€™ve ever heard.

Somewhere on the Internet, a typical redditor just creamed himself and felt an urge to post CCC-C-C-C-COMBO-BREAKER!1!.

Considering Blogs Harmful Considered Harmful Considered Harmful Considered Harmfulā€¦

sw.Start() should be sw.StartNew(), Mr. Dangerous.

How can GZip be faster than Deflate? GZip uses the exact same compression algorithm as Deflate (the deflate algorithm), but adds a header and a footer and calculates a CRC-32 checksum. Because of this, it should ALWAYS be slower than Deflate.

The fact that in your test GZip comes out faster might be because of the garbage collector or some other external factor. I suggest you change the order of your code: first test Deflate and then test GZip. If GZip is still faster, Iā€™ll retract my words.

You are not resetting the Stopwatch so EllapsedMilliseconds continues to grow with each Start/Stop

Sorry to say this Jeff, but Iā€™d agreeā€¦ MSDN states that the call to Stopwatch.Stop() does not reset the counter, and calling Stopwatch.Start() will continue from the previous time.

It seems to fit your data too. Looking at the differences between values,

GZip - Compress = 243, Decompress = 163
Deflate - Compress = 231, Decompress = 157

Not much in it really. Probably what I would expect considering the similar processing involved.

P.S. Iā€™m with you on the dangerous principle though Jeff. Never just believe anything you read/hear - always ask youself - do I agree? Does this make sense?

So, fixing the reset:
Gzip size: 3125
243-000=243
406-243=163

deflate size: 3107
637-406=231
794-637=157

They are close to each other, and decompressing takes less time than compressingā€¦ Much more sensical.

a blog entry that can affect a personā€™s life and can only be validated over the course of a career

At the risk of really distasteful name dropping and speaking on behalf of other people, Iā€™m 99.9% sure that Steve Yegge and Joel Spolsky would all agree with the point of yesterdayā€™s post: Learning a little bit about marketing will make you a better programmer.

So, based on the sum of our careers, that is one thing we have all learned and would like to share with other programmers.

what he can ONLY mean - in this conflation is that marketing is more important than programming in a programmer

Never said that, of course, and I donā€™t believe it.

Thomi, Varun Mahajan, Jeff
What I can understand from your points:

It is OK to write whatever you FEEL like writing in a programming blog. The readers are supposed to be intelligent (if not, they are doomed. isnā€™t it?) and so they ought to search and find the correct information from somewhere else.

Is that it?

I mean, I seriously cannot understand this. What is the need for reading all these blogs if I should verify every single word you write?

Also, tell me guys, where am I supposed to get the CORRECT information from?
Some other programming blog? What is the guarantee that it will be correct?
Some programming website? What is the guarantee that it will be correct?
Wikipedia?

What is the guarantee that the information in the WWW is correct if everybody thinks like you guys?

You try your best to write a correct article. Mistakes may happen; acknowledge and update. That is what I would suggest. (Rather than telling people will verify whatever crap you will write)

You do start and stop, but /reset/?

Of course youā€™re right.

sw.Start() should be sw.StartNew(), Mr. Dangerous.

Yep. :stuck_out_tongue: I hope no young, inexperienced programmers were reading that! Corrected.

Wellā€¦maybe Jeff, but you gotta admit this is a great quote.
No, heā€™s more like those girls in elementary school who were really good at jumping rope, and would jump the two opposite-ways-spinning ropes during recess for minutes at a time.
Only with sharks.
Wow, thatā€™s bad-ass!

WOW!!! how do you get them to bend like that?..I mean I know theyā€™re mostly cartilage and all but still. And Iā€™m assuming the tail is easy to hold on to but what about the other end with all the pointy-bits? what do you hold on to there?

Love the show.

Jeff,

From the doc it does seem like, Reset() is required in the stopwatch, havenā€™t used the class so donā€™t know what the actual semantics are.

But fits nicely into the pattern that you describe, 2x improvement for larger strings and smaller for smaller files.