[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: HTML5 => png or HTML5 => jpg.



On Thu, 24 Jul 2014 20:35:01 -0400
Jerry Stuckle <jstuckle@attglobal.net> wrote:

> On 7/24/2014 12:30 PM, peter@easthope.ca wrote:
> > From: Jerry Stuckle <jstuckle@attglobal.net>
> > Date: Wed, 09 Jul 2014 12:20:37 -0400

> > For the text manipulations, can you recommend AWK, Perl, sed or
> > another?
> > 
> > Thanks,                           ... Peter E.
> >  
> > 
> 
> My recommendation would be whatever you're most familiar with.  Almost
> any language (except maybe ALGOL) can do text manipulation.  But I
> wouldn't recommend learning an entirely new language just to do one
> job.
> 
> Of course, if you're not a programmer, you might want to enlist the
> help of a friend who could help you.  Cheaper than hiring a
> consultant )
> 
> Jerry

I'm replying only to Peter's question and Jerry's answer, with no
regard to converting HTML5 to .png...

What Jerry said. Use what you know.

If you're not a programmer, I'd recommend you learn Python, for the
following reasons:

1) Most readable language on the planet.

2) With its wonderful library of addons, you can finish any project you
   start.

3) Widely used. A Pythoner has a good chance of getting a job with it.
   An employer stands a good chance of finding a good Python
   programmer. If necessary, you can find people to maintain (hopefully
   well written) Python you've made.

4) Desert island principle: If you were stranded on a desert island
   with only one computer language, you'd by far want it to be Python.

5) Python is very easy to learn. Excellent first language.

6) Everyone should be able to do simple programming. Without that
   ability, you're at the mercy of your software and OS.

My recommendation is arguable. The fact is, for pure text manipulation,
and especially regex, Perl's easier. But Perl's "many ways to do it"
philosophy can cause you many problems in other contexts, including the
fact that you might not be able to read another guy's Perl code because
he does it completely different than you. Also, CPAN can be a PITA.

AWK is a world-class timesaver with a built in loop, made specifically
for text-processing text streams. For relatively simple text processing
tasks, ten lines of AWK that you write in five minutes can often do the
job. Even moderately complex text manipulation can often be done by
combinations of AWK and sort in a pipeline. But at some point of
complexity, when a lot of state is involved, AWK stops being practical,
and you need to use a more generally capable language. Like Python.

In summary, if you're not a programmer, learn Python. You'll always be
glad you did.

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Reply to: