For a small or medium-sized script, I like to write a
throwaway version, just to get an idea of the problem,
in deference to Brooks' admonition: "Plan to throw one
away: you will, anyhow." That gives me a
chance to try out one or two ideas without committing to
them, and generally the process of coding up a solution
gives me other (often better) ideas. Of course, hacking
up a half-assed solution just to get started isn't all
that great an idea when you know that Management's going
to assume that the first working program you come up with
is the Solution. In that case, it's probably better to
proceed more slowly, and be more careful.
As far as algorithm design goes, I have a fairly well
developed (read: geeky and obscure) interest in "the
standard Comp. Sci. algorithms" -- things like graph
traversal, network flow, various and sundry data
structures, etc -- and keep a handful of algorithms books
around my computers. I've gotten used to trying to think
of problems in "formal" terms -- "Wait a minute, this is
a directed graph" -- which comes in handy when I'm trying
to figure out the "how" of solving a problem. It does
take some getting used to, though.
This study also gave me a decent understanding of a few
basic techniques for building algorithms -- divide and
conquer, dynamic programming, recursion, and so on. It's
much easier to hack up an algorithm for your particular
problem with more tools in your chest than basic iteration
The hell with paco, vote for Erudil!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||