[The Java Posse] Re: Dick, that's not how you compare strings!

2010-08-05 Thread Christian Catchpole
Code lurking in every BMW.. if (gps.atDestination() && ! destination.toLowerCase().equals(gps.getLocation().toLowerCase())) { this.getPetrolTank().explode(); } On Aug 5, 3:53 pm, B Smith-Mannschott wrote: > great post Reinier! :) > > And to further confuse matters: > > - lowerca

[The Java Posse] Re: Scala and Java spec size

2010-08-05 Thread Christian Catchpole
I can give you an 8 bit Assembler spec in about 10 pages. Coding in that must be really easy. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javapo...@googlegroups.com. To unsubscribe from this group, send

Re: [The Java Posse] Dick, that's not how you compare strings!

2010-08-05 Thread Alexey Zinger
Very interesting read, but I gotta ask about toUpperCase(Locale). You've soundly debunked the idea of using toLowerCase(Locale) as a reliable internationalizable way of comparing strings irrespective of capitalization. Am I wrong in considering toUpperCase(Locale) as a more suitable alternati

[The Java Posse] Scala and Java spec size

2010-08-05 Thread JodaStephen
Kevin Wright is fond of repeating: Java (3rd Edition): 649 pages, 7932 KB Scala (current in trunk): 191 pages, 1312 KB therefore Scala is less complex. But has anyone actually analysed the specs in detail? In code coverage terms, how many distinct "code paths" are there in each spec. That is sure

Re: [The Java Posse] Re: Post your strangest loop and win (up to) 4 free passes to Strange Loop!

2010-08-05 Thread Alexey Zinger
Surely we can figure something out with runtime bytecode emission... From: Quoll To: The Java Posse Sent: Wed, August 4, 2010 12:20:32 PM Subject: [The Java Posse] Re: Post your strangest loop and win (up to) 4 free passes to Strange Loop! I'd love to write

[The Java Posse] Re: Post your strangest loop and win (up to) 4 free passes to Strange Loop!

2010-08-05 Thread Heath
Duff's Device is my favorite. If someone knows how to make this infinite, I'm eager to hear. -Heath import java.io.File; import java.net.URL; import java.net.URLClassLoader; public class StackOverflow { static { try { Class.forName(StackOverflow.c

Re: [The Java Posse] Re: Scala is complete esoteric nonsense!

2010-08-05 Thread Kevin Wright
Or because it lacks the big corporate backing, more likely! EPFL is certainly no Oracle or Microsoft And Martin Odersky, while a world class expert on type systems and able to write a superlative compiler against the JVM, surely doesn't engage in all that many business luncheons where he tries to

[The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Casper Bang
Hehe interesting observation. Personally I jumped over to computers and programming when I discovered how fast/cheap mistakes could be corrected as oppose to having to etch a new PCB, erase the EPROM, wait for new parts etc. :) On Aug 5, 4:28 pm, Paul Gearon wrote: > On Thu, Aug 5, 2010 at 10:24

Re: [The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Paul Gearon
On Thu, Aug 5, 2010 at 10:24 AM, Fabrizio Giudici wrote: > Actually you made me feel younger by mentioning the Hall effect (that > I only vaguely recalled :-) Given the conversations in here, I'm guessing that quite a few people in here got their degree in Elec. Eng. :-) Paul -- You received

[The Java Posse] Re: Scala is complete esoteric nonsense!

2010-08-05 Thread Casper Bang
Java, C#, and F# recommended by the ACM for SEC regulation spec language. No mentioning of Scala [because it's complete esoteric nonsense?]: http://is.gd/e49Vt (PDF) /Casper On Aug 4, 7:23 am, Wildam Martin wrote: > On Tue, Aug 3, 2010 at 18:28, Dick Wall wrote: > > or doing it with anonymous i

Re: [The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Fabrizio Giudici
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/5/10 16:15 , Casper Bang wrote: >> Errr. Induction: yes. Hall effect: no. >> >> You'd have to strip down the wires on your appliance to use the >> hall effect, since this requires measuring a current across the >> wire. Instead, they use a to

[The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Casper Bang
> Errr. Induction: yes. Hall effect: no. > > You'd have to strip down the wires on your appliance to use the hall > effect, since this requires measuring a current across the wire. > Instead, they use a toroid around the wire to get the best inductive > coupling they can and measure the current

Re: [The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Paul Gearon
On Thu, Aug 5, 2010 at 9:17 AM, Casper Bang wrote: > Cool device. However, the problem with these cheap meters(which rely > on induction and the hall effect) is that they are not accurate enough > to be useful for for anything but fridges, ranges etc. Errr. Induction: yes. Hall effect: no. Y

[The Java Posse] Re: About Maven and repository problems discussed on Twitter

2010-08-05 Thread Stephen Gregory
if you're using ant you should: 1) set the default task to something sane 2) not hardcode paths If you're in an organization using maven you should: 1) have an organizational parent pom (and this makes step 2 easier) 2) (this goes for ivy or sbt as they use the same system) you should be managi

Re: [The Java Posse] Re: Post your strangest loop and win (up to) 4 free passes to Strange Loop!

2010-08-05 Thread Josh Suereth
Taken from: http://www.scala-lang.org/api/current/scala/collection/immutable/Stream.html def from(n: Int): Stream[Int] = Stream.cons(n, from(n + 1)) // Here's the loop... def sieve(s: Stream[Int]): Stream[Int] = Stream.cons(s.head, sieve(s.tail filter { _ % s.head != 0 }))

[The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Casper Bang
Cool device. However, the problem with these cheap meters(which rely on induction and the hall effect) is that they are not accurate enough to be useful for for anything but fridges, ranges etc. If you notice the datasheet [http://www.farnell.com/datasheets/ 409580.pdf] and apply this to a PC (7..

[The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Casper Bang
Cool device. However, the problem with these cheap meters that (which rely on induction and the hall effect) is that they are not accurate enough to be useful for for anything but fridges, ranges etc. If you notice the datasheet [http://www.farnell.com/datasheets/409580.pdf] and apply this to a PC

[The Java Posse] Re: Lead Technical Architect opening at American Express

2010-08-05 Thread pforhan
On Mon, Aug 2, 2010 at 6:37 PM, Michael Bailey wrote: > My employer (American Express) has this job posting that may be of > interest: > > http://jobs.americanexpress.com/job/Phoenix-Lead-Technical-Architect-Job-AZ-85001/891254/ This is actually a pretty fun read. If only the wife would ever con

[The Java Posse] Re: Linux power saving utility

2010-08-05 Thread Vince O'Sullivan
On Aug 4, 5:32 pm, Jan Goyvaerts wrote: > I'm certainly not pretending granula does a better job. I'm just interested > how one measures power consumption. Hence my question. At home we have one of these installed. Basically it's consists of a small battery powered transmitter that loops around

[The Java Posse] Re: Post your strangest loop and win (up to) 4 free passes to Strange Loop!

2010-08-05 Thread Reinier Zwitserloot
That'll replace spaces in string literals as well. On Aug 4, 9:43 pm, Kyle Renfro wrote: > Great contest! > 1 pass required. > > Here is a very handy loop that *everyone* should use. ha ha. > > import java.io.*; > import java.util.logging.*; > > public class AddTabs { > >     public static void m

Re: [The Java Posse] Re: Post your strangest loop and win (up to) 4 free passes to Strange Loop!

2010-08-05 Thread Viktor Klang
Guys, I'm a bit surprised not to see any multithreaded strange loops yet. On Thu, Aug 5, 2010 at 10:56 AM, Roel Spilker wrote: > Did you use a regular expression on purpose? > > > -Oorspronkelijk bericht- > > Van: kyleren...@gmail.com [mailto:javapo...@googlegroups.com] > > Namens Kyle R

RE: [The Java Posse] Re: Post your strangest loop and win (up to) 4 free passes to Strange Loop!

2010-08-05 Thread Roel Spilker
Did you use a regular expression on purpose? > -Oorspronkelijk bericht- > Van: kyleren...@gmail.com [mailto:javapo...@googlegroups.com] > Namens Kyle Renfro > Verzonden: 04 August 2010 21:43 > Aan: The Java Posse > Onderwerp: [The Java Posse] Re: Post your strangest loop and > win (up t