Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FUCKING JAVA

Name: Anonymous 2010-03-31 21:23

Now, I have to write a crossword solver using Java for an AI class - no problem, right?
...until you factor in FUCKING JAVA.

First, I created an arraylist of constraint objects - now there are only 16 of them on the example I'm running, and it just holds something like four integers. Then I get OUT OF HEAP MEMORY or some gay shit error like that, after swearing at the automatic garbage collection and calling it manually I saw that it didn't help, and then I thought I shouldn't have used a faggy arraylist in the first place - so I make an array.

I use a set of 36 to ensure it fits but I get an out of bounds index error
huh
I increase array size to 90
same error
reduce to 17
same error

WHAT THE FUCK

JAVA SHOULD DIE IN A FUCKING FIRE

Name: Anonymous 2010-04-02 21:27

>>33
C is 'dangerous'
Don't think I've said this, altough C does open you up to the potential of making certain errors. This isn't neither bad or good, it's just what you ask for when you use C, and it's usually exactly what you want(managing pointers and memory yourself).
'takes too long'
I've found this to be in practice true. Writing one tool took me some 10 hours to write an debug in C, while writing it in a high-level language only took 2 hours to write and debug. The source code size was also about 4 times less. This is just a matter of picking the right tool for the job. I don't regret writing the C version as it's very slim and fast, but it was my mistake for using C to do an inheretely high-level task, and I could have finished my program 8 hours earlier had I chosen a different language. It's just about the tradeoffs one has to make.
Same goes for just about everything else out there, including brainfuck.
A practical example out of my daily life:
I sometimes use an embedded language that comes with one tool to automatize certain complex tasks. The language is highly inadequate, slow and painful to use for complex tasks. It even lacks basic procedural abstraction (it's basic-like, but not quite). If the tool provided a more suitable language, development time could be decreased by an order of magnitude. Of course, I can technically do anything in the language, and it does seem to contain at least minimal elements needed for Turing Completeness. However, what I do in practice when I get fed up with it, is just call external code written in C or other languages as the embedded language has a way of calling external code. The point I tried to make here is that a language which is unfit for the job will only make your work harder and take longer, providing you're actually coding in the original language, without implementing a new language on top of it. (In defense of that embedded language: it's actually reasonable and easy to use it for certain simple task that you would do in that tool, and for that it's a fine language, but as complexity increases, it does not scale at all.)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List