Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11932

Re: Interplatform (interprocess, interlanguage) communication

From BGB <cr88192@hotmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Interplatform (interprocess, interlanguage) communication
Date 2012-02-11 00:49 -0700
Organization albasani.net
Message-ID <jh56jr$c38$1@news.albasani.net> (permalink)
References (15 earlier) <8158603.396.1328908529933.JavaMail.geo-discussion-forums@pbmb9> <jh43hj$oa8$1@news.albasani.net> <31853844.362.1328913143289.JavaMail.geo-discussion-forums@pbne9> <jh4bn6$89h$1@news.albasani.net> <J4kZq.4545$xH4.1983@newsfe19.iad>

Show all headers | View raw


On 2/10/2012 7:08 PM, Arved Sandstrom wrote:
> On 12-02-10 08:10 PM, BGB wrote:
> [ SNIP ]
>>
>> this is missing the point. to write ones' own code is not the same as to
>> forsake using an existing standardized file format.
>>
>> I do use a lot of standardized formats, just I often feel little need to
>> use others' implementations of those formats.
>>
>> for example, I have my own implementations of PNG, JPEG, Deflate, ...
>> granted, I didn't really "need" to do so, but often to use a library
>> means either creating an annoying external dependency issue, or needing
>> to drag around the library, when often one can get by just writing a
>> much smaller and more narrowly focused piece of code to deal with it.
>>
> Apart from a situation where you are genuinely resource-constrained and
> need to slim down the library in question [1], I don't see those factors
> as justifying the effort. "External dependency"? You've already got one
> - you depend on the file format specification. So would you rather spend
> the (usually substantial) time understanding the spec and implementing
> the format, or have other folks do it for you?
>

it depends some...

but, anyways, depending on the format is not a dependency, since the 
code doesn't care about the format spec. maybe the programmer does when 
they implement it, but this doesn't matter for the program.


what is a dependency is whether or not the library exists on the user's 
system. if one needs a library, and it is not there already, well then, 
the app isn't going to work (hence why one would end up having to bundle 
such libraries with the app, ...).


the main issue is also copy/pasting around a bunch of extra source-code, 
and dealing with making sure it all builds, some of which may have 
annoying legal terms if used this way: worse if it is GPL (though GPL is 
generally annoying all around in these regards). some other libraries 
have requirements that one mention the library and its authors in the 
credits, ...


in the case of JPEG, it was more effort probably to skim through the 
spec than write the code to load/save the format (mostly because the 
JPEG spec is overly long-winded, and most of its relevant contents could 
be probably boiled down to a few pages).

the only real difficult part of PNG is Deflate (yes, also handled by 
zlib or similar, if one wants to worry about it).

it might be a little easier to "sell" someone on using all of these 
libraries if they were all aggregated into a single library (much like 
"libavcodec" in the case of audio/video codecs).


> And "drag around the library"? Who are you kidding? Look at the size of
> libtiff libraries on a typical Linux or Unix system, and then look at
> the supported API: you think the library is bloated? You think the
> effort is justified to understand the TIFF spec well enough to pick out
> just the bits you need, so you can build your own library? Or look at
> the Javadoc API for iText 5.1.3: http://api.itextpdf.com/itext/. You
> think the 1.6 MB size of the core iText JAR is so indefensible that it's
> worth your time to understand the PDF spec well enough to write your own
> library for just the bits you need?
>

TIFF: not sure why someone would want TIFF support in the first place, 
so no really comment here. apparently it is mostly for people who want 
48 bit color depth or something.

I have not considered PDF loading or saving (not terribly relevant in my 
case).

an LWO loader might be nice, given I haven't gotten around to writing 
one yet (but, the observant may notice: even if a 3rd party LWO loader 
was used, it wouldn't probably load into the mesh-format my engine uses 
already, making it essentially pointless). not that it really matters: 
if I really cared much about LWO, I probably would have had a loader for 
it already.


> It's possible a few times in your career to adopt a new file format so
> early that nobody else has a decent library for it. Or the only decent
> ones are commercial, as another possibility. This is quite rare, though.
>

or, one might develop their own file-formats as well, without being 
chained to the cult of "does a library already exist for that?..."


another power of writing ones' own code is that there is control over 
what is done and why. with a 3rd party library, one may be stuck with 
whatever way *they* chose to do something, impeding ones' own freedom to 
do it differently and to try out alternate possibilities.


more so, writing code is fairly cheap.

but, anyways, most of the stuff where people are worrying about writing 
code oneself, is typically in regards to trivia.

what is there to really to gain from doing all of the hard parts of app 
development, by actually writing the app, but then spending inordinate 
time worrying about not re-implementing functionality which exists in 
libraries.


probably, if a typical programmer can go read a spec for a file format, 
throw something together, and have everything working ok in maybe a few 
hours or so, what really is the problem? it could very well end up being 
more time and effort working out differences between the library's API 
and however the app does things internally.

it may even be the case that using the library would end up with one 
writing more code than just doing it oneself more directly...


but, whatever, people can try to micro-optimize their productivity or 
whatever if they want (ultimately, so long as one does stuff and gets 
stuff done, it is probably good enough regardless of whether or not it 
is the "most efficient" regarding programmer-time or whatever...).

doesn't hurt programmers too much, given it gives something to do, 
especially if one is being paid by the hour, or by the kloc (arguably, 
it is a win-win situation, either way the employer gets code, and the 
employee gets money).

then one is all on the job, "keeping it real" and "doing their thing" 
and similar.


> AHS
>
> 1. Possible, I suppose, if someone is asking you to do miracles with a
> dinky low-end microcontroller.

mostly it is about writing 3D engines for desktop PCs which work on both 
Windows and Linux (though Windows is the much higher priority).

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Interplatform (interprocess, interlanguage) communication jebblue <n@n.nnn> - 2012-02-07 12:11 -0600
  Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-07 16:38 -0700
    Re: Interplatform (interprocess, interlanguage) communication Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-07 20:26 -0400
      Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-08 01:41 -0700
        Re: Interplatform (interprocess, interlanguage) communication Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-08 07:19 -0400
          Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-08 12:07 -0700
            Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-08 21:16 -0500
              Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-08 19:50 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-09 06:24 -0400
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-09 09:15 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-09 18:58 -0400
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-09 16:15 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-09 18:50 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-09 21:40 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 14:47 -0500
                Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-11 12:06 -0800
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 15:18 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-11 23:03 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-12 09:27 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-12 13:33 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-12 15:50 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-12 14:34 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-09 18:48 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-09 21:46 -0700
                Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-10 08:51 -0800
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-10 10:43 -0700
                Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-10 13:15 -0800
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-10 14:50 -0700
                Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-10 14:32 -0800
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-10 17:10 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-10 22:08 -0400
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-11 00:49 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-11 14:04 -0400
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 14:55 -0500
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 14:52 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-11 20:06 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 22:41 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-12 00:46 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-12 09:29 -0500
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-12 09:31 -0500
                Re: Interplatform (interprocess, interlanguage) communication Martin Gregorie <martin@address-in-sig.invalid> - 2012-02-12 16:02 +0000
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-12 11:16 -0500
                Re: Interplatform (interprocess, interlanguage) communication Martin Gregorie <martin@address-in-sig.invalid> - 2012-02-12 22:46 +0000
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-12 11:33 -0700
                Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-11 20:18 -0800
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-12 01:36 -0700
                Re: Interplatform (interprocess, interlanguage) communication Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-02-12 13:52 -0600
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-12 14:43 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 14:49 -0500
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-09 18:46 -0500
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-09 18:45 -0500
        Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-08 14:02 -0800
          Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-08 18:49 -0700
            Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-08 21:14 -0500
              Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-08 20:07 -0800
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-08 23:29 -0700
                Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-09 09:40 -0800
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-09 17:02 -0700
              Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-08 21:10 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-09 18:54 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-10 10:25 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 14:45 -0500
                Re: Interplatform (interprocess, interlanguage) communication Lew <lewbloch@gmail.com> - 2012-02-11 12:14 -0800
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-11 15:20 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-11 22:20 -0700
                Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-12 09:23 -0500
                Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-12 12:13 -0700
    Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-07 20:24 -0500
    Re: Interplatform (interprocess, interlanguage) communication Martin Gregorie <martin@address-in-sig.invalid> - 2012-02-08 01:31 +0000
      Re: Interplatform (interprocess, interlanguage) communication BGB <cr88192@hotmail.com> - 2012-02-08 00:55 -0700

csiph-web