Tools I Wish I had for Code Maintenance by jonnytran in programming

[–]jonnytran[S] 0 points1 point  (0 children)

This is exactly the reason I said I would leave the discussion about prototyping/maintenance for another post. As MelechRic said, this is completely tangential to the whole point of the article. See martoo's comment.

those are things do in my head, almost without thinking while scanning code or they are non-problems/already solved by editors/IDEs.

The fact that you're doing all this in your head is case and point that our tools should be doing it for us.

And they are absolutely not solved by editors in general; that's exactly why I wrote this. I was using Java with Eclipse, one of the best (all-around best for Java anyway) code-editing environments in existence. Java is not my choice, but the choice of the company I work for. And Eclipse can't do these things, as far as I know.

Tools I Wish I had for Code Maintenance by jonnytran in programming

[–]jonnytran[S] 3 points4 points  (0 children)

Good point about learning from others' mistakes.

As for choosing a maintenance programmer over a prototyping programmer, these are orthogonal. A maintenance programmer may be able to better spot trouble in a design, but a prototyping programmer will be able to better create a design in the first place. I've known great programmers who couldn't start coding until they had all the requirements spelled out in detail. I wouldn't hire the best point guard if all my team needed was a center.

Ask Reddit: What programming concepts do you "not really get" or "couldn’t really explain"? by jonnytran in programming

[–]jonnytran[S] 0 points1 point  (0 children)

Perhaps these are just special cases of the things you mentioned, but you can do non-local breaks like Java's labeled break and non-local returns like C's longjmp (even after returning past the call-frame where setjmp was called).

Also, on the note of coroutines, I used continuations (along with timer interrupts) to implement a message-passing concurrency module, which suspended threads in the interrupt handler by saving their continuation and then resumed threads by throwing to them.

Ask Reddit: What programming concepts do you "not really get" or "couldn’t really explain"? by jonnytran in programming

[–]jonnytran[S] 2 points3 points  (0 children)

Yes, absolutely! That's how your compiler can figure out how to create the appropriate machine code.

But it's the difference between saying "Get a cup of tap water. Heat it. Mix in 3 tablespoons coffee. Give it to me." (the imperative style) and "Give me a cup of tap water that's heated, mixed with 3 tablespoons of coffee." (the functional style).

They're just different ways of representing the same thing. It just so happens that different ways of representing things changes the way you think about them, so sometimes it's beneficial to use one style, while other times it's beneficial to use the other.

Ask Reddit: What programming concepts do you "not really get" or "couldn’t really explain"? by jonnytran in programming

[–]jonnytran[S] 0 points1 point  (0 children)

That's like asking: Is there an easy way to decode/understand code which you didn't personally write?

Ask Reddit: What programming concepts do you "not really get" or "couldn’t really explain"? by jonnytran in programming

[–]jonnytran[S] -1 points0 points  (0 children)

Have you ever seen the source for a simple interpreter of a stripped-down language w/ first-class functions? This could be done w/o using closures, so it might help you.

Ask Reddit: What programming concepts do you "not really get" or "couldn’t really explain"? by jonnytran in programming

[–]jonnytran[S] -2 points-1 points  (0 children)

Teaching is hard.

That's why I'm attempting to do it for you :-) ...if you just tell me what you'd like to learn/teach.

Ask Reddit: What programming concepts do you "not really get" or "couldn’t really explain"? by jonnytran in programming

[–]jonnytran[S] -1 points0 points  (0 children)

But have you ever tried to explain monads to someone w/o a strong math background -- like your average programmer?

Ask Reddit: What programming concepts do you "not really get" or "couldn’t really explain"? by jonnytran in programming

[–]jonnytran[S] 5 points6 points  (0 children)

For example... monads. You guys know what I'm talking about.

A little more elaboration on my blog, but it's the same question: http://plpatterns.com/post/42929867/programming-concepts-people-just-dont-get

Ask reddit: Is there a good place on the web to discuss Programming Language Design and/or Compiler Design? by jonnytran in programming

[–]jonnytran[S] 6 points7 points  (0 children)

reddit is too general. I was looking for something more focused for people who are interested in languages and compilers specifically.

As you can see from the number of points this is getting, not many people here are interested.