![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid XP v8 wrote:
> http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html
I few clicks away from this, I got to here:
http://www.eis.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf
I don't know about you, but *I* have always wondered why some people
find programming hard. It is a "well known" fact that there seem to be
two types of students: those who "get" programming, and find
introductory courses ridiculously easy, and those do "don't get"
programming, and find even the simplest exercises insummountably difficult.
I haven't finished reading this paper yet, but it throws some
interesting ideas out there. One particular paragraph leaps out at me:
capabilities of computers could have a massive negative impact on their
success at programming. Many of their subjects tried to use meaningful
names for their variables, apparently hoping that the machine would be
able to read and understand those names and so perceive their intentions."
Oh I have *so* seen this! People who seem to think that if they write
their code with obvious-enough names and syntax that's near-enough to
being correct, the computer will "just know" what they mean. They fail
to grasp that the syntax must be EXACTLY CORRECT, even if it seems silly
or unnecessary.
I guess it's because they're used to talking to humans. If you say
something to a human with somewhat incorrect grammer (or even
horrifyingly broken grammer), they can usually still figure out what you
mean.
Computers are far, far more stupid than humans. But decades of advances
in computing technology have brought us to the point where computers
*look clever*, even though they aren't. I suspect this might be why some
people have trouble learning to *use* a computer too.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid XP v8 <voi### [at] dev null> wrote:
> http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html
>
> Oh, *that's* fizzbuzz? Hmm, OK.
>
> Also... that's really kinda scary. o_O Let's hope plumbers are better...
> uh... hmm, OK, maybe not. Well let's hope to **** that medical
> professionals are better! O_O
the real problem is that many people who should really be plumbers or medicals
are into programming careers. well, plumbing may still have its uses... :)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> Also... that's really kinda scary. o_O Let's hope plumbers are better...
>> uh... hmm, OK, maybe not. Well let's hope to **** that medical
>> professionals are better! O_O
>
> the real problem is that many people who should really be plumbers or medicals
> are into programming careers. well, plumbing may still have its uses... :)
Well, hey, at least getting programming wrong doesn't kill people...
...oh, wait:
http://en.wikipedia.org/wiki/Therac-25
Hmm. Oh dears.
Well, at least if a plumber or medical person does their job wrong, you
can get compensation? :-}
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
nemesis wrote:
> the real problem is that many people who should really be plumbers or medicals
> are into programming careers. well, plumbing may still have its uses... :)
One could argue that The Real Problem(tm) is that IDE vendors keep
claiming to have made programming "easy" now. ;-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> be competent programmers even though they hadn't ever written a single line
> of code.
I usually ask them to print out the prime numbers less than 100 or something.
> On a side note, interviewers should, on the other hand, be careful with
> what they consider "trivial" assignments.
Yeah. I had one that was something like "print the lowest N values from a
binary tree, in C". When's the last time I did recursion in C? And doing it
over the phone? Bleh.
--
Darren New, San Diego CA, USA (PST)
C# - a language whose greatest drawback
is that its best implementation comes
from a company that doesn't hate Microsoft.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid XP v8 <voi### [at] dev null> wrote:
> nemesis wrote:
>
> > the real problem is that many people who should really be plumbers or medicals
> > are into programming careers. well, plumbing may still have its uses... :)
>
> One could argue that The Real Problem(tm) is that IDE vendors keep
> claiming to have made programming "easy" now. ;-)
still waiting for the magical "Make Solution" button... ;)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> find :: (Ord y) => (x -> y) -> y -> IArray x -> (Int,Int) -> Maybe x
> find field target array (base,size)
> | size < 0 = error "invalid subrange size"
> | size == 0 = Nothing
> | size == 1 = if field (array ! base) == target then Just (array !
> base) else Nothing
> | otherwise =
> let size2 = size `div` 2
> in find field target array (base, size2) `mappend` find field target
> array (base + size2, size - size2)
I don't know Haskell, but my best guess at understanding this code looks
like you're always recursing into both sides, without actually doing the
comparison of the center element to the target element. So you're not
saving any time, and you would get faster results with a linear search.
But maybe I just don't understand the language well enough to see the
comparison.
- Slime
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> writes:
> Warp wrote:
> I usually ask them to print out the prime numbers less than 100 or something.
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 91, 97]
for prime in prime:
print prime
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Slime wrote:
> > find :: (Ord y) => (x -> y) -> y -> IArray x -> (Int,Int) -> Maybe x
> > find field target array (base,size)
> > | size < 0 = error "invalid subrange size"
> > | size == 0 = Nothing
> > | size == 1 = if field (array ! base) == target then Just (array !
> > base) else Nothing
> > | otherwise =
> > let size2 = size `div` 2
> > in find field target array (base, size2) `mappend` find field target
> > array (base + size2, size - size2)
>
> I don't know Haskell, but my best guess at understanding this code looks
> like you're always recursing into both sides, without actually doing the
> comparison of the center element to the target element.
Oh... my god... >_<
I blame Warp. I was so busy making sure that there's no off-by-one
errors that I totally forgot to actually, you know, IMPLEMENT THE RIGHT
ALGORITHM!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
OK, 3rd time lucky: let's see if I can actually implement this thing
correctly. :-P
find :: (Ord y) => (x -> y) -> y -> IArray x -> (Int,Int) -> Maybe x
find field target array (base,size)
| size < 0 = error "invalid subrange size"
| size == 0 = Nothing
| size == 1 = if field (array ! base) == target then Just (array !
base) else Nothing
| otherwise =
let
size2 = size `div` 2
base2 = base + size2
in
case compare (field (array ! base2)) target of
EQ -> Just (array ! base2)
GT -> find field target array (base, size2)
LT -> find field target array (base + size2, size - size2)
Now, finally, it should work. (But I've said that twice before already...)
Damnit, no wonder nobody loves me. :-(
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |