9,538 reputation
12042
bio website en.wikipedia.org/wiki/…
location United States
age 70
visits member for 4 years, 3 months
seen Dec 17 at 17:16

BS Mechanical Engr.
PhD CS(AI)
CS Prof (4yr)
Numerous consulting jobs.
15 yr at http://www.pharsight.com
Published book on CS & several articles
4 kids, 2 grand
Pilot(student)

P.S. The picture is a Beta-prime distribution. It shows the program speedup factors you can get if you see a problem twice in 2, 3, 4, and 5 samples.


Aug
16
comment How will quantum computing change programming?
@Philip: Suppose you have a 1024-entry table, so it takes 10 bits to index it. You have a 10-(qu)bit register, and it has 1024 possible states. OK, so you create a universe in which the register is 0, another in which it is 1, up to 1024 parallel universes. Then the quantum "instructions" operate on all of these in parallel. Each universe has an "amplitude vector", whose magnitude is its probability, but it also has a direction, and those are being manipulated. Since the collection of 1024 vectors has a non-zero average vector, the rotation makes one bigger, the rest smaller.
Aug
16
comment How will quantum computing change programming?
@Philip: I know the math is pretty off-putting, but the key idea is the rotation about the mean, which has the effect of transferring probability to the answer state. Then you run back to the beginning and run forward and do it again, a certain number of times. Then if you do the observation, you've maximized the probability of seeing the answer state.
Aug
10
comment If your algorithm is correct, does it matter how long it took you to write it?
@Jaydee: I think of performance in terms of percentages, as opposed to a teeny bit multiplied over jillions of runs. I've managed to ruffle feathers with this viewpoint, but often programs contain larger speedup opportunities than you might think, but you do have to be smart about how you look for them.
Aug
10
comment If your algorithm is correct, does it matter how long it took you to write it?
IMHO it's more important to be right than to be quick. Often I don't feel like I really believe in an algorithm/program/language design until the 3rd or 4th version. At the same time, I'm often told that I work fast, but I don't look at it that way. As I look around, people just tend to make things way too complicated.
Jul
5
comment Designing an email system to guarantee delivery
Just thinking out loud: Why not design an email system where the sender pays the recipient a certain amount for each message? The recipient would choose the amount, and it could be different for different senders. That would put a screeching halt to spam, and the worthwhile messages might actually get through.
Jun
30
comment if you were asked to answer to the question “ what is the difference between the English language and a programming language” how you will respond?
@DeadMG: Try reading Lacuna, The Death of Ivan Illych, Heart of Darkness, Mrs. Dalloway, or A Thousand Acres and show me a comparable program. Software does something for you. Literature does something to you.
Jun
24
comment Teaching logical/analytical thinking
@mcwise: Not every teacher teaches the same way, but for me, nothing gets students fired up like the first time they write a program that asks them their name and then replies with a random insult like HI THERE BILLY, YOU ARE A BIG SMELLY SLOB :)
Jun
24
comment Teaching logical/analytical thinking
@Joshua: The problem with the idea "logical thinking" is it's way too vague. When they start making little programs they will be thinking logically, like it or not, so I never made that a separate goal. That said, you need to find your own way forward, so whatever works for you, go for it.
Jun
24
comment Teaching logical/analytical thinking
Bubble Sort is way too advanced for beginners. For that, you first have to learn variables, loops, conditionals, and the really big one - arrays.
Jun
12
comment What is the meaning of the sentence “we wanted it to be compiled so it’s not burning CPU doing the wrong stuff.”
@JoachimSauer: You're right of course. It's still hard to make an interpreter run with less than a factor of 10 speed penalty compared to compiled code. If the language is one that really spends all its time in subordinate compiled functions that have to be called anyway, like math libraries or I/O, the cost of interpreting is not a problem.
Jun
2
comment Why do some programmers think there is a contrast between theory and practice?
@LieRyan: Engineers have draftsmen (er.. persons) (or CAD tools) to make their detail drawings. (I did that too.) On the issue of ingenuity, it's a gripe of mine, because I've stumbled on a couple of techniques with big payoff - random pausing and differential execution - and the counter-argument I hear most often boils down to "that's not what people were taught" (i.e. not readable). Heaven forbid they should have to be open to something new to get higher productivity.
Jun
2
comment I'm having trouble learning
(continued) I would give suggestions of problems, such as Hangman, Wumpus, baseball or football simulation (without graphics), science simulation like sailboat racing or genetics, family banking or investment system, maybe something that plays music, or Conway's Life game. Students would get the idea and then come up with their own.
Jun
2
comment I'm having trouble learning
+1 You said what I was going to say. I used to teach intro programming, and we started all students off in BASIC, because it's easy to get started. The object is to get into an individual project ASAP. Later courses taught Pascal. (This was before C was widely used.) The main thing is to get started on some problem that you find interesting, but is not too hard.
Jun
1
comment Why do some programmers think there is a contrast between theory and practice?
In my exposure to civil engineering (way back when) there were fields of study on structures, soils, waterways, highways & railways, etc. (You wouldn't believe the math, physics, & fancy programming involved.) Then also project management, costing, etc.
May
29
comment Why is quicksort better than other sorting algorithms in practice?
+ Right. Teachers need to be more aware (and I was a teacher) of the fact that constant factors can vary by orders of magnitude. So the skill of performance tuning really matters, regardless of big-O. The problem is, they keep teaching gprof, only because they have to get past that bullet point in the curriculum, which is 180 degrees the wrong approach.
May
24
comment Software Optimization vs. Hardware Optimization - what has the bigger impact?
@dwelch: 9600 baud was considered state-of-the-art fast not that long ago.
May
20
comment How to deal with over-complication?
+1 for the St-Exupéry quote.
May
8
comment Why isn't the line count in Visual Studio zero-based?
@svick: I know, but programmers can be silly. 1) Know how the "mod" function in math should give you a number from 0 to N-1? Well, "%" says -1%3 is -1. This also affects the way "/" works. Why? Principle of minimum surprise. 2) On performance most (not all) programmers have a blind spot - they think you have to measure to find what to fix. Even if you show them why that's not so, they treat you like you're crazy.
Apr
27
comment Merge sort versus quick sort performance
@Neil: Is that right, that mergesort prefers a mostly sorted list? I thought mergesort was basically the same no matter what.
Apr
26
comment Merge sort versus quick sort performance
As Robert said, quicksort is only quadratic in the worst case, and that's easily fixed. In general, the way to compare algorithms is by counting some basic operation, like comparison. Semantically equivalent programs can vary dramatically in their constant factors, with aggressive tuning needed to make them as fast as possible.