69 messages in com.googlegroups.android-developersRe: Java?| From | Sent On | Attachments |
|---|---|---|
| wolf | 12 Nov 2007 21:53 | |
| zaqintosh | 12 Nov 2007 22:17 | |
| Elaine | 12 Nov 2007 22:28 | |
| Gothy | 12 Nov 2007 22:42 | |
| wolf | 12 Nov 2007 22:43 | |
| Augusto | 12 Nov 2007 22:50 | |
| shyland kolo | 12 Nov 2007 22:52 | |
| wolf | 12 Nov 2007 23:23 | |
| GaoXianchao | 12 Nov 2007 23:23 | |
| nanna | 12 Nov 2007 23:23 | |
| EdgarVerona | 12 Nov 2007 23:24 | |
| Aaron Ardiri | 12 Nov 2007 23:27 | |
| EdgarVerona | 12 Nov 2007 23:31 | |
| wolf | 12 Nov 2007 23:33 | |
| Aaron Ardiri | 12 Nov 2007 23:35 | |
| EdgarVerona | 12 Nov 2007 23:40 | |
| zhang xi | 12 Nov 2007 23:40 | |
| Aaron Ardiri | 12 Nov 2007 23:40 | |
| wolf | 12 Nov 2007 23:43 | |
| wolf | 12 Nov 2007 23:48 | |
| Muchacho | 12 Nov 2007 23:49 | |
| wolf | 12 Nov 2007 23:50 | |
| GaoXianchao | 12 Nov 2007 23:55 | |
| EdgarVerona | 12 Nov 2007 23:55 | |
| Aaron Ardiri | 12 Nov 2007 23:56 | |
| GaoXianchao | 12 Nov 2007 23:58 | |
| EdgarVerona | 13 Nov 2007 00:00 | |
| GaoXianchao | 13 Nov 2007 00:03 | |
| EdgarVerona | 13 Nov 2007 00:05 | |
| Vincent Nguyen | 13 Nov 2007 00:05 | |
| Xwan...@gmail.com | 13 Nov 2007 00:07 | |
| Androider | 13 Nov 2007 00:10 | |
| EdgarVerona | 13 Nov 2007 00:13 | |
| Androider | 13 Nov 2007 00:17 | |
| Muchacho | 13 Nov 2007 00:19 | |
| rajavelu | 13 Nov 2007 00:32 | |
| Androider | 13 Nov 2007 00:35 | |
| GaoXianchao | 13 Nov 2007 00:38 | |
| Albert Sanchez | 13 Nov 2007 00:48 | |
| yaxeka | 13 Nov 2007 03:41 | |
| Will Jordan | 13 Nov 2007 04:08 | |
| smau...@gmail.com | 13 Nov 2007 04:15 | |
| Mazon | 13 Nov 2007 04:20 | |
| Augusto | 13 Nov 2007 04:26 | |
| GaoXianchao | 13 Nov 2007 05:26 | |
| Mast3rpyr0 | 13 Nov 2007 05:31 | |
| Aaron Ardiri | 13 Nov 2007 05:47 | |
| ~mono | 13 Nov 2007 06:08 | |
| Zolookas | 13 Nov 2007 06:09 | |
| GaoXianchao | 13 Nov 2007 06:24 | |
| Muchacho | 13 Nov 2007 06:53 | |
| Albert Sanchez | 13 Nov 2007 07:01 | |
| amirisetty vijayaraghavan | 13 Nov 2007 08:15 | |
| amirisetty vijayaraghavan | 13 Nov 2007 08:15 | |
| sund...@gmail.com | 13 Nov 2007 08:36 | |
| amirisetty vijayaraghavan | 13 Nov 2007 08:46 | |
| mickstricks | 14 Nov 2007 07:19 | |
| gabrielpalomino | 14 Nov 2007 07:35 | |
| moa | 14 Nov 2007 09:06 | |
| Luis | 14 Nov 2007 09:23 | |
| StephC | 16 Nov 2007 00:51 | |
| StephC | 16 Nov 2007 01:17 | |
| giom...@gmail.com | 16 Nov 2007 02:05 | |
| Ahmet A. Akin | 16 Nov 2007 04:14 | |
| gabrielpalomino | 16 Nov 2007 05:05 | |
| Sébastien Boisgérault | 16 Nov 2007 05:28 | |
| Berco Beute | 16 Nov 2007 13:13 | |
| Guerra | 16 Nov 2007 13:35 | |
| qb | 16 Nov 2007 13:56 |
| Subject: | Re: Java?![]() |
|---|---|
| From: | EdgarVerona (edga...@gmail.com) |
| Date: | 11/13/2007 12:13:15 AM |
| List: | com.googlegroups.android-developers |
Guys, guys... we're trying to avoid a flame war here, not add fuel to the fire. =)
Let's all calm down and have a nice, cool glass of O.J.
Mmm, actually, that sounds better than I thought it would. (going to the fridge)
On Nov 13, 12:10 am, Androider <jand...@gmail.com> wrote:
Die, C, die! 5 reasons to UN-learn
C.<http://blogs.zdnet.com/Burnette/?p=208> Posted
by Ed Burnette @ 12:01 am Categories:
General<http://blogs.zdnet.com/Burnette/?cat=1>,
Java <http://blogs.zdnet.com/Burnette/?cat=4>,
Community<http://blogs.zdnet.com/Burnette/?cat=14>,
Programming <http://blogs.zdnet.com/Burnette/?cat=16> November 28th,
2006http://blogs.zdnet.com/Burnette/?p=208
I've been programming in C for over 20 years now. I've written C compilers, C debuggers, other languages, games, clients, servers, you name it. Dog-eared editions of K&R and Steele decorate my shelves. So I know C. And yet, I'm sick of it. SICK.
So it was with some trepidation that I read a blog on why every programmer
should learn
C<http://www.jubling.com/ten-reasons-why-every-programmer-should-learn-...>.
Turns out it's good for a laugh if you're a professional developer, though
the author probably didn't intend it that way. This
rebuttal<http://softwarex-nz.blogspot.com/2006/11/why-idiots-shouldnt-write-to...>makes
a bit more sense, but still doesn't capture the essence of why C
should go the way of the dodo. So let me turn it around. Here are 5 reasons
why developers who know and use C now should not just use something else,
but UN-learn all the bad things they learned in C.
*1. Memory allocation.* I could write a whole article just on this one. A book. Maybe a small wing of the library. Memory allocation and deallocation is the bane of my existence. Either you allocate too little and write off the end, or too much and waste it. Then there's the question of whether to zero it or leave it uninitialized. But freeing memory is the worst. Entire toolkits have been written to help you make sure you have freed every little bit you allocated, never use it after freeing, and God forbid, never free it twice. To add insult to injury, allocations and frees are slow in C, very slow. I don't want to even think about all the special cases I've had to put in to *avoid* memory allocation and use stack or pre-allocated structure space if the problem size fit. Well, I've got better things to worry about. Whoever invented garbage collection should win a Nobel.
*2. Multi-threading.* I used to like C, really. Until I started to develop and maintain multi-threaded servers with it. C doesn't help you at all with protecting data from access by conflicting threads. Every intuition you had from single-threaded days is wrong. At least Java has the synchronized keyword, and a documented (but weird) memory model, but even that falls apart on massively parallel machines unless you use the new javax.concurrentstuff. Flashback - in C: 1 week standing up (true story) in a data center debugging a deadlock problem in a simulated production environment. In Java: Ctrl+Break! Ahhh.
*3. Pointers.* Pointers are insidiously evil; there's just no polite way to say it. Months of my life are just gone from debugging problems with wild pointers. I used to go for all the tricks, such as incomprehensible casts and unions and offsetof and reusing the last couple of bits for flags, and all that. It's just not worth it. Statically typed references are your friend.
*4. Premature optimization.* Speaking of tricks, have you ever wasted any brain cells wondering if *p++ was faster than p[i]? Have you spent time trying to do shifts instead of multiplies, or reversing for loops to try and make them run faster? Agonized over the speed of passing parameters as opposed to filling in a structure and passing that? STOP IT! Algorithms are the key to speed, and developer productivity is the key to algorithms. Get the idea that you can make your program any better or faster with little tweaks out of your head. Yeah, there are a few cases where maybe... no, just don't go there.
*5. Tests.* What's your favorite C unit testing tool? Umm..... can't think of one? Unit testing must not be important then, right? Or too much trouble. Hard to keep up to date. Waste of time. You could spend that time shaving .001% off your execution time. Or debugging that problem that only occurs with 100 simultaneous users, in the data center, on an optimized image with no symbols.
I could go on, but 5 is enough for now; I feel better already. C was wonderful... in 1984. It amazes me that new code is being written in C, even today. C++ is only marginally better if you ask me. If you want to learn something old, try Forth, Lisp, or APL. At least those can teach you some different and elegant ways of thinking about programming.
On Nov 13, 2007 4:08 PM, Xwan...@gmail.com <Xwan...@gmail.com> wrote:
... I remember trying out Java around 96
hey man seems long time ago
On Nov 13, 2:44 pm, wolf <wolf...@gmail.com> wrote:
I don't know in which industry you work, but as I said I have never seen any useful Java application. Can you name one? Let's look at office applications or any applications that are usually used with Windows or MacOS. Do you have any Java application running on your PC? We are talking about mobile phones with slow processors, slow memory busses and slow graphics chips ... Java did not work out on PC platforms, why should it work out in much less powerful mobile platforms?
I am pretty long in the industry and it is not fun to see things like this come up from time to time. Those dead horse jokes come to mind :-) ... I remember trying out Java around 96. Everyone agreed that it is a cool concept but everyone also agreed that we have to wait until it starts to run fast enough. I think I went back a few times to see if it can run anything ... it never reached any acceptable level.
- Wolf
On Nov 12, 10:17 pm, zaqintosh <zaqi...@gmail.com> wrote:
UUUh, you're joking right?
I just did a random job search, and the amount of java jobs more than doubled the amount of C++ jobs.
On Nov 13, 12:54 am, wolf <wolf...@gmail.com> wrote:
Hi, <rant> Java is a pretty dead language. Since the middle of the 90th it is used for teaching programming. There was never any useful application written in Java since then. I wonder why a language that has proven to be slow and that was never adopted by the industry should be used for mobile phone development? Just the fact that JAVA is used here takes away all credibility. </rant>
This leads me to my main question: how can I use C++ then?
- Wolf- Hide quoted text -
- Show quoted text -




