Reprogramming (Reprog)
reprog.wordpress.com · Personal blog · on HN since 2010
Reprogramming is Mike Taylor's blog on programming craft, covering correct code, binary search, git criticism, and book reviews.
What HN saysCommenters link it for the binary search challenge and the invariants walkthrough, and for its critiques of git's usability.
48HN people shared it
23linked it in comments
107stories submitted
2.0Kstory points
4 months agolast shared
2010people per year2026
Most-shared posts
- 1Are you one of the 10% of programmers who can write a binary search?9 people · 90 points · first shared 2010 · 99 comments on HN
- 2Whatever happened to programming?4 people · 199 points · first shared 2010 · 111 comments on HN
- 3Steve Jobs "never had any designs. He has not designed a single project"4 people · 176 points · first shared 2010 · 84 comments on HN
- 4Still hatin' on git: now with added Actual Reasons4 people · 116 points · first shared 2010 · 166 comments on HN
- 5Git is a Harrier Jump Jet. And not in a good way3 people · 18 points · first shared 2010 · 33 comments on HN
- 6Homepage3 people · first shared 2011
- 7Dublin Core's dirty little secret (2010)2 people · 100 points · first shared 2021 · 53 comments on HN
- 8Hackers, architects, and superheroes: 3 ways to be an excellent programmer2 people · 74 points · first shared 2010 · 10 comments on HN
- 9Writing correct code, part 1: whatever happened to invariants?2 people · 49 points · first shared 2010 · 10 comments on HN
- 10What does it take to test a sorting routine? (2010)2 people · 30 points · first shared 2010 · 17 comments on HN
- 11Is Lisp just too hard?2 people · 15 points · first shared 2010 · 17 comments on HN
- 12Semantic versioning is a mistake2 people · 14 points · first shared 2023 · 12 comments on HN
- 13Testing is not a substitute for thinking2 people · 8 points · first shared 2010 · discussion on HN
- 14Dammit, Amazon.com, will you please let me use my store credit?2 people · 7 points · first shared 2010 · discussion on HN
- 15Binary search redux (part 1)2 people · 5 points · first shared 2010 · 1 comments on HN
What HN people wrote when they linked it
adyimpulse · 2017-07-25
https://reprog.wordpress.com/ is a great one i discovered recently.
MikeTaylor · 2024-11-16
Just dropping in to say that The Elements of Programming Style is worth reading three times — and I have read it many more times than that, and benefitted from it. Here's my review (from 2010) if you're interested: https://reprog.wordpress.com/2010/03/06/programming-books-part-2-the-e…
mtVessel · 2022-05-03
If you don't recognize the term as having a specific meaning in programming, it may be worth reading up. This[1] blog post has a great walkthrough of invariants.
https://reprog.wordpress.com/2010/04/25/writing-correct-code-part-1-in…
mark-r · 2022-03-07
That passage was the inspiration for someone's blog to present a challenge and see how many people could pass the test.
https://reprog.wordpress.com/2010/04/19/are-you-one-of-the-10-percent/
Covered by HN at the time: https://news.ycombinator.com/item?id=1277459
My own solution was in Python, so it didn't fall prey to the very common integer overflow error. Python has the amazing and handy property that integers don't overflow.
IshKebab · 2014-11-13
Are you serious? Git is by far the least user-friendly version control system I've used (Mercurial being the best).
Here are some longer articles explaining why git sucks so much (from a convenience / user friendliness point of view):
http://reprog.wordpress.com/2010/05/10/git-is-a-harrier-jump-jet-and-n…
http://merrigrove.blogspot.co.uk/2014/02/why-heck-is-git-so-hard-place…
http://stevebennett.me/2012/02/24/10-things-i-hate-about-git/
Version control is one of those annoying admin tasks that you have to do and what to think about as little as possible. Git makes you think about it a lot.
wink · 2013-01-18
I really don't want to derail the thread, but one of the people participating in that G+-thread (Mike Taylor) has written some very good articles at http://reprog.wordpress.com/ (and I really can't remember if I picked up the subscription here or elsewhere)
jerf · 2011-11-16
My objection to "the semantic web" is:
1. Semantics only have meaning in a given context.
2. "Global context" is an oxymoron.
And most of the song-and-dance routine about how wonderfully fantastic the semantic web will be implicitly assumes the creation of a global context, in which we all reasonably precisely agree on all the semantics of everything, and that's total pie-in-the-sky.
Recommended reading (which has the advantage of being a war story and not an exercise in theoretical handwaving): http://reprog.wordpress.com/2011/04/19/semantic-mapping-is-hard/ Also, follow those first two links down too ("the MARC format" and "Dublin Core") for full comprehension. You can't even get agreement on being what an author is between two contexts, and you think you're going to build a glorious semantic web‽ The semantic issues aren't going to get easier after that attribute....
JoachimSchipper · 2011-07-29
The follow-up article at http://reprog.wordpress.com/2010/03/04/whatever-happened-to-programmin… addresses this comment, essentially saying "my job doesn't suck, but what about everyone else?"
rix0r · 2011-06-27
For another thing, on WordPress.com the "View Standard Site" button hardly ever works for me.
I keep on trying it, hoping for the better, and cursing every time I'm forced to deal with the OnSwipe theme.
And on Mike Taylor's blog (http://reprog.wordpress.com/), the scroll used to be broken in OnSwipe (it kept scrolling me back to the top). Not sure if it's still the case, these days I just keep to my feed reader instead of visiting his site because I don't want to deal with OnSwipe.
spacemanaki · 2011-07-14
You're not, and I think this is where a lot of flamewars between Git and Mercurial users and between DVCS and centralized VCS users start, so I while I don't want to feed the fire, I will only cautiously recommend peeking at Joel Spolsky's Hg Init tutorial, and see if Mercurial is a bit more natural for you, since a lot of people seem to think it's simpler (I have no opinion, mostly because I haven't used Mercurial much).
At the end of the day, for me it boils down to a comment by Xiong Chiamiov, made on one of Mike Taylor's rant-y blogposts about Git, which was much discussed on HN a while ago,
"I use it because the benefits outweigh all of the things that you mentioned."
Yeah, it's complicated. But a lot of people think it's worth it.
edited to add links to the Reinvigorated Programmer posts, which I recommend reading because there's a ton of good commentary and suggestions for newcomers, even if the discussion got a bit heated:
http://reprog.wordpress.com/2010/05/10/git-is-a-harrier-jump-jet-and-n…
http://reprog.wordpress.com/2010/05/12/still-hatin-on-git-now-with-add…
bigDinosaur · 2022-09-03
It's true there's nothing about what she really got up to, but there are hints that she's hardly benign, e.g. in the speech discussed here https://reprog.wordpress.com/2012/12/29/i-wish-jackson-hadnt-ruined-ga… (that was just the first result I found on Google).
quietbritishjim · 2021-07-23
I agree it's very easy to make an off-by-one mistake in binary search. (Related article: [1]) But an interview candidate showing something that is almost right and then has enough self-awareness to say "but I'm sure there's an off by one error in there somewhere" has given a really good overall answer in my books. I think there's still value in asking the question because that sort of answer constrasts against candidates who flounder completely (which is more common than you'd imagine).
A common counter argument is that a bad interviewer wouldn't accept an answer that has minor bugs in it like that. But I don't buy that counter argument, because a bad interviewer could misjudge candidates regardless of the interview format.
[1] https://reprog.wordpress.com/2010/04/19/are-you-one-of-the-10-percent/
sp332 · 2017-02-28
There are edge cases that are easy to forget about even if you have the general idea. This article is about binary search, not bubble sort, but it has a lot of the same problems. https://reprog.wordpress.com/2010/04/21/binary-search-redux-part-1/
d0mine · 2017-02-26
It is not about ignorance. It is about self-awareness.
Similar problem:
"Most programmers think that with the above description in hand, writing the code is easy; they’re wrong. The only way you’ll believe this is by putting down this column right now and writing the code yourself. Try it." https://reprog.wordpress.com/2010/04/19/are-you-one-of-the-10-percent/
Also, how often do you write complete implementations of anything on the whiteboard at work and therefore how useful is this skill?
ColinWright · 2013-04-18
Sister post: Things that Brits find incomprehensible about the USA
http://reprog.wordpress.com/2013/04/18/things-that-brits-find-incompre…
Wilduck · 2012-01-30
An interesting article that links back to this one:
http://reprog.wordpress.com/2010/04/19/are-you-one-of-the-10-percent/
The claim is that even ignoring overflow, only 10% of programmers can correctly implement a binary search. When I tried it, I thought I got it working, but it was later pointed out that I didn't handle empty lists correctly.
Programming correctly is hard.
dbbo · 2011-10-14
No, it isn't. Da Vinci used a paintbrush to paint. Steve Jobs did not use C to program, because he never wrote any code or even designed anything according to at least one verifiable source[1].
It's more like saying the paintbrush is more important than anything some really successful art dealer ever did.
http://reprog.wordpress.com/2010/09/06/steve-jobs-never-had-any-design… (the book mentioned in the blog post, not the post itself)
manuscreationis · 2011-10-06
This man begs to differ:
http://reprog.wordpress.com/2010/09/06/steve-jobs-never-had-any-design…
rjrodger · 2011-03-02
Only if you get it right: http://reprog.wordpress.com/2010/04/19/are-you-one-of-the-10-percent/
mahmud · 2010-04-15
Eli responds to him nicely:
http://reprog.wordpress.com/2010/04/14/the-long-overdue-serious-attemp…
User23 · 2024-08-20
> If you exclude the programmers who are incapable of writing FizzBuzz
FizzBuzz really is trivial. Binary search on the other hand is deceptively tricky[1]. It was well over a decade from its discovery to the first correct published implementation! No doubt if asked to write it, you'd look it up and say that's trivial, all the while double checking Internet sources to avoid the many subtle pitfalls. You might even be familiar with one of the more famous errors[2] off the top of year head. And even then the smart money at even odds would be to bet against your implementation being correct for all inputs.
And if you had to do it just from a specification with no outside resources? Much harder. At least unless you know how to formally construct a loop using a loop invariant and show monotonic progress toward termination each iteration. Which brings us back to the original submission. There are some programs that are pretty much impossible to prove correct by testing, but that can, relatively easily, be shown to be correct by mathematical reasoning. Since this is a comment on a submission by Dijkstra, here[3] is how he does it in didactic style
> If you mean "could sit down and write one that worked the first time without testing", then yes, you could be write. But could not write one at all? I don't buy it.
Yes that's what "correct" means. Code that only works sometimes is not correct.
[1] https://reprog.wordpress.com/2010/04/19/are-you-one-of-the-10-percent/
[2]…
_Y_ · 2011-11-26
I'd like to address your WoG example. Firstly there are two types of pirates. Those that don't have the money to ever buy, those that have money. The first (and arguably largest group) will NEVER be your customer. These are people that can barely afford their internet. If there was no piracy these people would never get your game. Second group consists of two subgroups - those that might pay and those that wont. I'd argue that the first group is larger based on examples below. Also there are some transitions from people that can't pay into a group that might pay (e.g. a student gets a high paying job and can afford books/software that he pirated before).
However they are not a crux of my concerns. I think the value of piracy is a "word of mouth" advertisements. Even if only people that can't afford your game and pirate it there is going to be boon for your business (e.g. poor kid might have someone who is a bit richer and will buy the game to show off) if they spread good word about it.
"First is Monthy Python. A while back, the Monty Python team made a shedload of their sketches freely available in high quality on their own YouTube channel, hoping that as a result people would buy more DVDs. According to this widely linked story, the experiment has been not just successful, but wildly, crazily so. They’re reporting that sales of Monty Python DVDs at Amazon have increased by 23,000% — that’s 231-fold — since they made all that material available on Youtube."
(Neil…
rdela · 2010-11-02
as I point out in the other HM #6 thread:
http://news.ycombinator.com/item?id=1856078
since the debate PDF is free to download, Cheng Soon didn't make a clickable table of contents for it on the site, but here are links to original articles:
Programming Languages?
http://postabon.posterous.com/why-i-chose-common-lisp-over-python-ruby…
http://thecleancoder.blogspot.com/2010/08/why-clojure.html
Key Decisions Google Founders Made?
http://www.quora.com/What-were-the-4-or-5-key-decisions-that-Larry-Pag…
http://news.ycombinator.com/item?id=1502765
New York or San Francisco?
http://adgrok.com/new-york-will-always-be-a-tech-backwater-i-dont-care…
http://kellysutton.tumblr.com/post/901431677/choosing-new-york-over-sa…
Git or Mercurial?
http://reprog.wordpress.com/2010/05/12/still-hatin-on-git-now-with-add…
http://yehudakatz.com/2010/05/13/common-git-workflows/
http://blog.extracheese.org/2010/05/why-i-switched-to-git-from-mercuri…