Skip to main content

Moving away from using multi-dimensional arrays into single dimensional.

7 replies [Last post]
dmitry_belov
Offline
Joined: 2009-03-16

Have you guys considered moving away from using multi-dimensionals? It would save a little memory overhead. A lake is made from every little drop :)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

Usability was the first word I used and the difference is noticeable.
However, I can guarantee that you will see no noticeable difference in an actual application even if you remove all multi-dimensional arrays (there aren't many anyway).

dannyb3
Offline
Joined: 2007-06-12

Have you considered moving away from Java to Assembly language?

A program is made of every little machine instruction.

Oh, I see. The problem is that higher level abstractions are far more productive for the programmer. We've moved from an era where the computer was vastly expensive compared to programmers to one where developer time is a major cost factor.

So really we should be asking the opposite question. Why doesn't our programming language have a commonly used abstraction: multidimensional arrays?

vprise
Offline
Joined: 2003-11-07

No.
Saving every little drop was never our goal. Usability, quality, maintainability and reliability are far more important than minor optimizations.

Mixa

Sounds too categorically.

I also do not like multidimensional arrays in java, and you know they
actually are not arrays but lists (and this is error prone by the way,
if speaking not about performance but maintainability). Single
dimensional should be used instead.

If maintainability is really a goal, instead of the matter of
multidimensional arrays, which hardly costs anything in
maintainability terms comparing to single dimensional, you should
consider using a normal command line building tool such as ant or
maven, and probably unit tests. Building in Netbeans looks, erhm, like
a grand father technology for several years already.

But sure LWUIT is a great job anyway. Thanks to God, we always have a
chance to be better ;)

Mike

On Thu, Jul 1, 2010 at 3:04 PM, wrote:
> No.
> Saving every little drop was never our goal. Usability, quality, maintainability and reliability are far more important than minor optimizations.
> [Message sent by forum member 'vprise']
>
> http://forums.java.net/jive/thread.jspa?messageID=476497
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

dmitry_belov
Offline
Joined: 2009-03-16

Netbeans uses Ant underneath anyways :) Netbeans is very practical for what it is!

Mixa

Yes, I know that netbeans use Ant, and other IDEs can deal with ant
projects too (and maven).

But Ant script generated by netbeans is not good for human use - I
tried once to use a project with such Ant script, and was not
successful - I stopped when discovered that it can be built only with
Netbeans installed (it used some jars from Netbeans). It was exactly
that I tried to avoid.

And I do not like dealing with scripts generated by robots - they have
so much possibilities, so even authors can't understand results :)
It's like working with auto-generated makefiles for C projects in
Linux...

Mike

On Fri, Jul 2, 2010 at 7:36 PM, wrote:
> Netbeans uses Ant underneath anyways :)   Netbeans is very practical for what it is!
> [Message sent by forum member 'dmitry_belov']
>
> http://forums.java.net/jive/thread.jspa?messageID=476665
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Mixa

Just FYI - I compile LWUIT sources under maven. The build script is as
easy as pie.

On Fri, Jul 2, 2010 at 8:41 PM, Mixa wrote:
> Yes, I know that netbeans use Ant, and other IDEs can deal with ant
> projects too (and maven).
>
> But Ant script generated by netbeans is not good for human use - I
> tried once to use a project with such Ant script, and was not
> successful - I stopped when discovered that it can be built only with
> Netbeans installed (it used some jars from Netbeans). It was exactly
> that I tried to avoid.
>
> And I do not like dealing with scripts generated by robots - they have
> so much possibilities, so even authors can't understand results :)
> It's like working with auto-generated makefiles for C projects in
> Linux...
>
> Mike
>
> On Fri, Jul 2, 2010 at 7:36 PM,   wrote:
>> Netbeans uses Ant underneath anyways :)   Netbeans is very practical for what it is!
>> [Message sent by forum member 'dmitry_belov']
>>
>> http://forums.java.net/jive/thread.jspa?messageID=476665
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net