XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] parsing markup with Perl

Hi Ihe,

On Mon, 10 Feb 2014 09:58:16 +0000
Ihe Onwuka <ihe.onwuka@gmail.com> wrote:

> On Mon, Feb 10, 2014 at 9:31 AM, Shlomi Fish <shlomif@shlomifish.org> wrote:
> 
> Gday,
> 
> >
> >  Furthermore, like
> > Curtis "Ovid" Poe (another Perl developer and writer) noted in a blog post,
> > the natural conclusion of using the absolutely best tool for the job is
> > having a polyglot (or maybe https://en.wiktionary.org/wiki/mishmash is the
> > word ) codebase written in 10 or even 20 different programming languages,
> > which will take a lot of knowledge to fully study and understand.
> >
> 
> Well Curtis is touting a false dichotomy. You don't need the
> absolutely the best but you do need something that is fit for purpose
> in the domain that is the object of concern.

I guess I agree that it's a false dichotomy, but please don't attribute it to
Mr. Poe, because I was quoting and possibly paraphrasing on what he said from
memory. In any case, the Freecell Solver core source code alone
( http://fc-solve.shlomifish.org/ - my own project ) now contains source code
and markup in C, Perl 5, GNU make, Python, Ruby, CMake, AsciiDoc, Bash, and
possibly other languages and I noticed that some other open source projects also
contain quite a bit of mishmash of stuff (don't know how the situation is with
proprietary software). So while not a dichotomy, the situation is still
certainly possible and may badly affect the accessibility and approachability
of contributing for the project.

> 
> Domain specific language vs Domain specific language masquerading as a
> possibly non-(standard|compatible|interoperable|performant|optimized)
> domain specific library in a general purpose language.
> 
> Choose as your poison the one that is less likely to make you sick/die.
> 

Not sure I understand, but I think you mean something like that if working in
PHP or Perl (for example) you should not parse HTML and XML directly by using
one-off regular expressions, but rather use a normal and sane parser. (To give
an example for what you mean and not keep it abstract). I can 100% agree with
it, but it is may be sometimes better to reinvent small wheels (in a good way)
than to drag an entire framework (or even module or library) for that.

Moreover, sometimes writing "ugly"/complicated/inelegant code with some
so-called anti-patterns can go a long way in making sure your code is kept
simple (see https://en.wikipedia.org/wiki/KISS_principle ). This is instead of
using an abstraction that tries to produce the most elegant code any time, and
ends up being hard to learn, use and read (there's some previous discussion on
it in this thread of Sayeret Lambda (an Israeli group of programming languages’
enthusiasts)
- https://groups.google.com/forum/#!topic/sayeret-lambda/oTdS8d0hqoE .

> >
> > Perfect is often the
> > enemy of good.
> >
> 
> Very true but often used as an excuse to unnecessarily implement crap.
> 

That's right. Someone I know used to have "Good is the enemy of great." as his
signature. It shouldn't be taken as gospel, and quotes (like the Rules of
Acquisition) can only be considered as guidelines, and I have my share of two
apparently conflicting quotes, and quotes that I know which are amusing, but
that I can no longer agree with (including ironically some quotes of my own.). 

I also read somewhere that many “famous” quotes and aphorisms are used to feign
authority, and so should be avoided as much as possible.

Regards,

	Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Interview with Ben Collins-Sussman - http://shlom.in/sussman

Alan: Hello, Miss Mandrake. I’m Alan. [she shakes his hand.]
John: John. [shakes his hand.]
Alan: We’re mighty vampires.
Selina: [Amusingly] Selina Mandrake, mighty pirate.

Please reply to list if it's a mailing list post - http://shlom.in/reply .


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS