« first day (1292 days earlier)      last day (3697 days later) » 

user55340
12:31 AM
Btw, poked at the close queue history... holy reviews batman @WorldEngineer (and thank you!)
 
user55340
(psst @JimmyHoffa another fun 10k power: who did what in the queue: programmers.stackexchange.com/review/close/history )
 
user55340
1:02 AM
@RobertHarvey I'm surprised thats not one of Andrew B's close reasons with his wife (see twitter.com/AndrewLBarber/status/305109014306492416 )... he's a mod now. He's got binding votes.
 
user55340
(Yea, I know, its that twitter thing... but trust me... you'll like it... or at least that message)
 
3:04 AM
@MichaelT Yeah, that's pretty good. I agree: too localized.
 
 
10 hours later…
12:55 PM
 
Is this an appropriate place to ask about how to use Jetty?
 
1:22 PM
@agent154 chat - yes. As for main site, you better be careful if you want to avoid down and close votes:
13
Q: Why was my question closed or down voted?

MichaelTHelp! My question was closed (or down voted). Why? And what can I do about it? Downvoted Duplicate Off topic What language to take up next Recommend a tool, library, or other Career or education advice (MSO) Which computer science / programming Stack Exchange do I post in? Are you still confu...

 
0
Q: How do I use Jetty to host multiple web apps?

agent154I have the following assignment I need to program using Jetty. I've done a bit of research into how Jetty works but I can't understand how I can have two applications running at once, as below it says I need to have two forms of URL: /student and /course. Do I want multiple handlers? Multiple co...

 
1:56 PM
I really don't know if I'm looking up the right search terms or not. I cannot find a single example that I can copy and paste to see how to get two different webpages on the same server. I'm searching for "Jetty two contexts" and "Jetty multiple contexts" on google and everything I find doesn't appear to do anything like want I want.
I just want to know how I can make a hello world application that gives a different website when I visit localhost:8080/hello1 and localhost:8080/hello2
 
user55340
@agent154 Are you trying to do one webapp with two pages or two web apps with one page each?
 
@MichaelT I suppose you could classify it as one webapp with multiple pages. At least I think so. The assignment description was posted in the question on Main I just linked.
I'm still not 100% sure I understand the assignment. It's supposed to build upon my last assignments so I have most of the code done.. I just need to adapt it to Jetty and use servlets, which I don't quite understand.
 
user55340
There are multiple ways to do this - and thats where your question is... confusing. I can have foo.war with a servlet in it and bar.war with a servlet in it... and thats two webapps. While foo.war that handles multiple pages. Two very different designs.
 
2:16 PM
@MichaelT Consider the following:
The application should allow for the creation and editing a student profile, the URL should start with /student. Additionaly the application should allow for the display of sections that a course is taught (similar to assignment 3). This URL for courses should start with courses. These two features are independent.
Since it says the two features are independent, does that lean toward two separate webapps or one app and two pages?
 
user20683
Looks like a single app with 2 pages
 
Do I need two servlets for this?
 
user20683
I wouldn't think so but my Java web chops are somewhat limited
 
Hi there ! I require some assistance.
 
user55340
@agent154 It all depends on how you do it. Multiple options are available.
 
2:20 PM
It's very small - nothing major :).
if ( 50 <= x <= 100 ) {
printf( "PASS \n");
}
else{
printf( "FAIL \n");
My interval - it's not working.
 
user55340
@agent154 one quick and simple thing I've got on github that uses a very basic design - github.com/shagie/TestingWithHsqldb/tree/master/src/main/java/…
 
user55340
@eXtremiity They don't work that way in most languages.
 
user55340
if(50 <= x && x <= 100) { ... }
 
Ah yes !!! That's what my lecturer wrote. I forgot about the &&.
What does "&&" mean ?
 
user55340
Logical (as opposed to bitwise) and
 
user41796
2:23 PM
@eXtremiity logical or Boolean AND
 
Ahh, Boolean AND. Perfect :)
Thanks guys :D ! Just doing first year computing. Very fun course !
 
user41796
@MichaelT - does @agent154's Jetty question on main come close enough to a design issue for it to stay on Progs? Or should it be migrated to SO as an implementation issue? I'm leaning towards SO.
 
user55340
@eXtremiity each of the <= returns a boolean. So 50 <= x returns true or false.
 
user55340
@GlenH7 I'd agree.
 
Fantastic. Thanks @MichaelT .
 
user41796
2:26 PM
I have voted to migrate
 
user55340
@eXtremiity then when you start putting it together... (true <= 100) makes no sense - probably getting a syntax error there (though C would allow it). You want (true && true)
 
Ahh yes.
 
user55340
@agent154 I'd strongly suggest making sure you've checked exactly what you are supposed to do. As I said, I can imagine several ways of doing this and some may be right for what you know and need to build on... others would be wrong.
 
user55340
I could do it with servlet-api-2.5, or 3.0 (I use 3.0 in the github link). I could do it with Spring, or Struts, or an old fashioned web.xml... all valid, not all correct for your homework.
 
@MichaelT I think I'll have to meet with my prof this afternoon to ask some questions. This assignment seems too beyond my current understanding.
 
user20683
2:30 PM
@eXtremiity Python's one of the few languages that would handle multiple comparisons like the first example.
 
user41796
@MichaelT time to revisit Java Reflection? :-D
 
Cool ! Oh, actually while I'm here I should ask another question.
So, I'm currently on a mac OX. Furthermore, I use Xcode.
The problem is, my course requires me to not only know C language, but gcc.
I.e., I have to be able to compile my c programs into computer language (as quoted by my lecturer).
My question is, how do I find such a gcc (compiler/command prompt?)
So I can type things like -Wall -Werror etc ...
 
user41796
@eXtremiity download it and compile it.
 
Oh, fair enough.
 
user41796
371
A: How to use/install gcc on Mac OS X 10.8 / Xcode 4.4

SteveStarting with Xcode 4.3 - you must now manually install command line tools from Xcode menu > Preferences > Downloads. Alternatively, there are stand-alone installation packages both for Mountain Lion (10.8) and for Mavericks (10.9). This package enables UNIX-style development via Terminal ...

 
user41796
2:34 PM
I'd read over that SO answer first before you try to compile it. It is worth being able to compile your own version of gcc. But you'll quickly be introduced to the GNU dependency-from-hell effect. If you're tight on time, you don't want to futz with it.
 
Thanks @GlenH7 .
 
@GlenH7 actually, a few answers further down there's a sensible solution: first install a package manager like Homebrew or MacPorts, then install GCC via that (these managers take care of compilation and dependencies)
 
user41796
@amon I had stopped at the first answer as it was good enough. But a package manager is a good idea, yes
 
user20683
Homebrew, Macports is a pain in my experience
 
user20683
it also tends to interfere with Rails
 
user41796
2:40 PM
I haven't used either, so I don't know. I tend to stay fairly close to stock with my mac. Mostly because I don't need other toolings beyond what is already provided. The JRE is an exception to that, but whatevers. My favorite game won't use the Oracle JRE instead of the Apple JRE so it doesn't matter.
 
Hmm. While I don't use Macs, I once used Macports to install ROOT (a scientific C++/Python library) for a friend. Having dependencies resolved automatically was much more enjoyable than battling previous error messages caused by the lack of X-Servers :/
 
user55340
Too many package managers for the mac... Mac Ports, Brew, Fink... I try to use brew as the one for most things but at one point I had something that was only fink.
 
user55340
Oh yea! Its that time again...
 
user55340
 
user41796
@MichaelT So far, I have successfully resisted the temptation of that game....
 
user20683
2:47 PM
Fink is ugly too
 
user55340
@GlenH7 Actually, thats my github DAG and the merges that happen just before a release.
 
user41796
@MichaelT I think I can safely stick with my earlier response. :-)
 
user20683
66
A: So obviously, P = NP

Eric LippertC# Your task is to write a program for SAT that appears to execute in polynomial time. "Appears" is unnecessary. I can write a program that really does execute in polynomial time to solve SAT problems. This is quite straightforward in fact. MEGA BONUS: If you write a SAT-solver that ac...

3
 
3:06 PM
@MichaelT His wife has a binding reopen vote.
 
user55340
@RobertHarvey So closing the shoes as a dup of the dress wouldn't go through?
 
@WorldEngineer now that is cool. Even I didn't know type resolution in the C# compiler was so advanced; I run into the edges too quickly, how nice when you've worked on the type resolution code and you know right where the edges are and aren't of the type resolutions capability.
@RobertHarvey now there's a perfect example of what I was talking about earlier of how you can encode problems in a type system and let the compiler solve the problem for you
dependently typed languages do it far better obviously, but that's interesting that of course someone who's actually worked on the C# compiler knows how to force it's type resolution to solve some problems
 
user55340
The neat thing about code golf is the ways people twist the language into things it should (or shouldn't) be able to do that you didn't realize in the first place.
 
@JimmyHoffa Eric didn't say how long that thing would actually take to execute. For all you know, you could eat lunch, come back and it would still be chewing on it.
 
@RobertHarvey Yes; compiling code that forces the compiler to solve something can take time. In his case he's not looking at a terribly large number of outcomes that need be bruteforced the way I read it, so I don't suspect it takes that long, but a similar problem could take forever.
That's why C#'s type resolution isn't any more advanced than it is, to avoid long compiler times being more common
constraint inference is where C#'s inference ends; that is it has none because the undecidability there would be too much
 
user41796
3:17 PM
@JimmyHoffa Just give the undecidable parts to a committee and let them hash it out. It's the corporate way.
 
in another one of his answers i just poked at SO he mentions it took him about a year to get the type inference for lambda parameters working right and it was something they were highly skeptical of because even that inference required enough type resolution that they were concerned it would blow out compile times
 
This would eliminate the possibility of using Constructor injected DI -- Why? You can still have parameterized instructors, so long as you include a default constructor for serialization purposes (the default constructor can be private, if you like). — Robert Harvey 7 mins ago
 
10
A: So obviously, P = NP

MauMulti-language (1 byte) The following program, valid in many languages, will give the correct answer for a large number of SAT problems and has constant complexity (!!!): 0 Amazingly, the following program will give the correct answer for all remaining problems, and has the same complexity. S...

That's just funny
If you can't add comments yet then you could choose to abuse the answer system as you've done, or you could choose to earn enough points to get the right to make comments by not abusing the system. My advice is to delete this non-answer and start contributing. — Eric Lippert 1 hour ago
haha harsh words
 
user41796
@JimmyHoffa classic example of failing to lurk before spewing forth an opinion
 
true
 
user20683
3:23 PM
unregistered and people wonder why I think that whole thing is a terrible idea.
 
user41796
I might grant that the person didn't know who Lippert was and didn't realize the extent of the challenge so they started whinging.
 
@WorldEngineer Nah... unregistered answering is fine. That's what we have moderation tooling for.
 
@WorldEngineer Because we might miss some captivating tidbit from some well-known computer scientist or other authority that doesn't wish to hop the registration fence. That's the story I've been given, anyway.
 
@GlenH7 Considering the technical comprehension displayed, I suspect they knew who lippert was but misunderstood the challenge; that they expected a perfect solution when the problem plainly admits it's known that there is no perfect solution and the challenge was to come up with faux-perfect solutions
 
user41796
Welcome to PPCG! This is an excellent analysis; however, we look for answers to be legitimate responses to the question. In other words, code. Unfortunately, that leaves scant space in our structure for commentary-only posts, which are relegated to the post comments. However, I would hate to see such a thorough effort be relegated to our slush pile, so I'd like to hint that if you added a computer program designed to answer the challenge requirements to your post, it would be more likely to be kept around. — Jonathan Van Matre Mar 13 at 23:32
 
user20683
3:24 PM
@RobertHarvey Alan Kay registered
 
user41796
Would provide more evidence that they just don't get the site.
 
@WorldEngineer Alan Kay is crazy
 
So did John Resig. I didn't say it was a sound policy.
 
@RobertHarvey JS lib folk are all over SO
 
I'd prefer that everyone registered. Consider it a Turing Test; if you can't muster enough energy or smarts to register, you probably don't qualify.
 
3:26 PM
JS lib creators all troll SO to advance people's usage of their libs
 
The first thing I did was register, even though I didn't have to. The notion of participating anonymously seemed ridiculous to me.
 
user41796
Anonymous participation kind of invalidates the additional benefits that participation provides
 
Meh, y'all just a bunch of anon haters
registered users troll just as much as anon users
 
user20683
@JimmyHoffa you've not been 10k long enough
 
user20683
Registered trolls are easier to track
 
user20683
3:29 PM
Andy being case in point
 
@WorldEngineer No; the point is the system works, I didn't say they don't try to create trouble, just that they don't create enough actual problems because the system is setup to handle them
 
user41796
@JimmyHoffa Nah, not really. There's a reason why protecting something actually works. Yes, it's a ridiculously low barrier, but it's still high enough.
 
user55340
The most 'annoying' answers for a 20k are the ones that were 2 years old, barely acceptable, by an unregistered user. Its a "is it really worth it to try to fix this, the person who answered it will never fix it and its really not that good..."
 
@GlenH7 well I agree with the SO model; I say it's too high. I say we could get quality questions and answers from unregistered users doing drivebys, I'm sure it can and does happen.
and while that's the minority of unregistered contribution, the garbage contributions get scurried off the shop floor by the community so it's not a big enough problem
Likely a larger problem on SO than here now that I think about it, harder to moderate SO than P.SE
 
Most professionals already understand that they're going to be asked to register on any professional website, to screen out the assholes.
 
user55340
3:33 PM
Identity is important (anon or pseudo anon or "this is me"). Registering helps fix that identity. Investing in the identity is something that can only be done over time.
 
user55340
@JimmyHoffa Its a question of how much ability the group of people who care about the site have to administer / moderate it.
 
@MichaelT and I think our current control is showing to be quite succesful :P
 
user55340
On P.SE it takes about 8-10 core group to keep things in line.
 
user55340
Because we can look at every question in a day, and cast the appropriate votes on it and keep up with the new questions.
 
user55340
On SO it takes on the order of 2000 people to do the appropriate amount of moderation.
 
user55340
3:38 PM
Thats an overall average, I'm sure that some tags (javascript, php) need an even more active subset of that group than say... haskell.
 
user55340
(speaking of Haskell... glance at the answers in:
 
user55340
38
Q: Is it dark outside? Draw a sun map!

Wander NautaOur closest star, the sun, is quite fidgety. The times it rises and sets depend on where you are, and whether it is winter or not. We would like to be able to deduce if the sun is shining outside without having to leave the comforts of our basements - which is why we need an up-to-date sun map (...

 
-2
Q: What wrong with my code?

D3r0X4I am solving UVA 10047, below is my code but i have one problem that why s1.x and s1.y never change ? Please point it out for me. Thanks. import java.util.*; public class Main { public static String[] matrix; public static int size_x, size_y; public static int source_x, source_y, en...

 
user55340
@RobertHarvey already self deleted.
 
user55340
(I was working on a custom off topic reason when it deleted... I wasn't even going to migrate to SO)
 
3:43 PM
Must have got lost. He's got an account on SO, though it would get closed in 5 seconds there.
 
user41796
@MichaelT I was going to migrate to SO since I think they need more high quality questions like that.
 
user55340
...implementation issue, lack but input, expected output and a Minimal, Complete, Tested and Readable example...
 
user55340
I'm still wondering if/how to respond to:
 
user55340
This is just a rant. Nothing more. At most, people can post a link to it in response to a homework question, but it's still going to happen. — JayScott 6 hours ago
 
user55340
on the open letter about homework.
 
3:48 PM
@MichaelT My response in the past to such comments has always been that we already know the [group we're targeting] won't read it. It's there to have something to point to, and to raise community awareness.
 
user41796
@MichaelT already got it
 
user55340
We have had, on rare occasion, someone read it after the first posting and then change their behavior.
 
user55340
@GlenH7 Thank you. Your response is well worded.
 
user41796
YW. I figured it would come across a lot better coming from someone other than the OP of that epic post. Not that you couldn't say it, but rather that any response you provide is viewed as biased.
 
user41796
How they missed the 169 up votes is beyond me.
 
user55340
3:53 PM
@GlenH7 Its actually 171, with a -2
 
user41796
<snickers>
 
user55340
While upvoting Cobins, he likely also missed Jimmy's comment:
 
user55340
I think you're missing the point of this post. It's not meant to be preventative, it's meant to simply be a letter to share some thoughts that may hopefully inform students of a common opinion of this site's community and how they might work with it more effectively. I don't suspect any students will read this before they are instructed to, but now that it's here they may be instructed to read it. Posting it on Meta is a valuable way of ensuring this site's community can publicize feedback so it's apparent that it is not simply the beliefs of one person, if it were that too would be obvious. — Jimmy Hoffa Sep 12 '13 at 22:18
 
user55340
Aww... we're so missing out on historical artifacts!
 
user55340
3:57 PM
32
Q: Programmers Stack Exchange swag for top users

Jeff AtwoodAs a thank you for being awesome, if you are on page 1 or page 2 of … http://programmers.stackexchange.com/users?tab=reputation&filter=all … we'll be sending you a little care package shortly: Programmers Stack Exchange t-shirt in your size Programmers Stack Exchange die-cut, vinyl stickers S...

 
user41796
Is there an SE store still?
 
user55340
Nope.
 
user55340
Though SF/SU appears to still have some stickers that you can get through SASE.
 
user41796
Darn. Once again too late to the game
 
user55340
2
A: Stickers still available?

Second RikudoYes, stickers are still available, as per the link presented in the comments (from two months ago): As described in this now-ancient blog post you can get yourself some stickers by just sending us a Self-Addressed Stamped Envelope. We'll put some Stack Exchange stickers in it and send it ...

 
user41796
4:01 PM
I think I'll send in a SASE and see what (if anything) comes back. Here's hoping they have Progs stickers. Tim's reply implies they may.
 
Anyone here have experience with JNI? Last time I looked at it, working with template classes was...painful. Is that still the case?
 
user55340
@ThomasOwens I believe so though can't say for sure.
 
And I think JNA didn't even support template classes. Probably because they were painful.
 
user55340
That said, there does appear to be some 3rd party libraries to try to make it less painful.
 
user55340
 
user55340
4:07 PM
> Improved the C++ support of the Parser for namespaces, derived classes, access specifiers, custom constructors, vector types, macros, templates, overloaded operators, etc
 
Programmers is about conceptual questions and answers are expected to explain things. Throwing code dumps instead of explanation is like copying code from IDE to whiteboard: it may look familiar and even sometimes be understandable, but it feels weird... just weird. Whiteboard doesn't have compilergnat 17 mins ago
^^^ voting down answers will likely drop me off 15K yet again (not that I complain)
 
47
A: Is it dark outside? Draw a sun map!

mniipHaskell - low quality code I was extremely tired when I wrote this. I might have gone too far with projections idea, anyway, here's the projection the program uses. Basically like projecting earth onto a cube and then unfolding it. Besides, in this projection, the shadow is made of straight l...

this is... beautiful
 
@RobertHarvey You say that you need mutability because you need to loop (otherwise you have to use recursion). Before I started using Haskell two years ago, I thought I needed mutable variables, too. I'm just saying there's other ways to "loop" (map, fold, filter, etc.). Once you take looping off the table, why else would you need mutable variables? — cimmanon 2 mins ago
What do I do with this guy?
 
@RobertHarvey is shooting him off the table?
He's already come down with a case of the haskell
I'm afraid there's not much we can do for him but put him out of his misery
 
@cimmanon: The whole point of my answer is that immutability is a language construct. You're running Haskell on a machine that is mutable through and through; it is only simulating immutability for your personal benefit. — Robert Harvey 6 secs ago
 
user55340
4:21 PM
 
user55340
Yea... and in Haskell nonetheless.
 
user55340
Though I'll point out the other haskell answer has its own aesthetics too.
 
user55340
40
A: Is it dark outside? Draw a sun map!

bazzarghHaskell, in the 'because it's there' category I was curious so I wrote one. The formulas are reasonably accurate[1], but then I go and use some ascii art instead of a proper Plate Carrée map, because it looked nicer (the way I convert pixels to lat/long only works correctly for Plate Carrée) i...

 
@MichaelT @RobertHarvey REST: A service which can be stopped or started; The start operation takes no parameters, should it still be a get? It's not a data retrieval operation but an active command to the service, but with no parameters do I still make it a post?
 
4:24 PM
that's the most idiotic review audit that I am going to pass: programmers.stackexchange.com/review/first-posts/56842 - not only they show me "known good" post I voted down and close but it's only asked today, no way on earth it could gain a solid amount of community regulars views at a smaller site like our. Oh well...
 
no parameters usually means get, but it returns no data and isn't conceptually a data retrieval...
 
@JimmyHoffa GET must be idempotent.
 
@RobertHarvey Thanks, that settles it
 
user55340
4:35 PM
@gnat I've been audit reviewed questions that I've downvoted, closed, and deleted.
 
user55340
Wait, I didn't delete it, I spam flagged it.
 
user55340
5
Q: Poor first post audit selection

MichaelTI had a first post audit today, and passed it... it was, well, too obvious. And while I realize that this is in part to catch robo reviewers, there can be some things done to improve it for the near-robob poor human choices too. The audit itself was this one. Do not select a first post from ...

 
5:21 PM
Everything is seg-faulting D:
 
user55340
6:20 PM
20
Q: Why do United States keep using "old" date representations and imperial system, while being in minority?

AthariSeveral facts: Vast majority of countries use International System of Units (SI), except US and a few other countries. Vast majority of countries use Celsius temperature scale, except US and a few other countries. Vast majority of countries use DMY or YMD date format, except US, Philippines and...

 
user55340
btw, I want to poke at Canada for having three date formats. dmy, mdy, and ymd are all valid in given settings.
 
user55340
If speaking French, its dmy. If speaking English its mdy. If working with the government its ymd.
 
user55340
(localization is fun!)
 
user41796
@MichaelT flags as offensive
 
user55340
That was meant to be read with an ironic thing.
 
user41796
6:25 PM
I've done too much internationalization work for it to ever be fun again.
 
user55340
I spent a good bit of last friday changing a 3rd party calendar picker to be localized for MDY and DMY...
 
user41796
Even in a joking sense...
 
user55340
and then I looked into Canada's system and what WTF Canada?!
 
user41796
eh?
 
user55340
I've also got to make it so that a person with a spanish language setting in southern California properly sees MDY while someone in Mexico sees DMY.
 
user41796
6:26 PM
I just signed a mountain of loan documents today for my mortgage refinance. Oddly enough, I was thinking about the date format as I was scribbling the date on everything.
 
user55340
I do MMM dd YYYY rather than MM/dd/YYYY
 
user41796
I did m/dd/yy today. Didn't care strongly enough to do otherwise.
 
user55340
Working in California with international people and sites it was the only way I could write properly and unambiguously.
 
user55340
March 18, 2014
 
@MichaelT Because popularity is always the best metric. Get it? Metric?
 
user55340
6:35 PM
@RobertHarvey There are some good cases for imperial units in the proper situation.
 
Boo. Humor fail. Guess I won't be here all week.
 
user55340
The temp scale is about human comfort levels - and when measuring the temp in my house, thats what I want to be concerned with.
 
user55340
(I got it but the smirk doesn't come through in text well)
 
user55340
I also like that units of volume are base 2ish in imperial.
 
Or, y'know, energy costs. The solar guys have been hounding me for months, but I just don't see poking holes in my roof for something that someone else is going to own, and I don't see paying $20,000 to own it myself.
 
user41796
6:37 PM
@RobertHarvey punnery fail. !=
 
user55340
1 cup = 16 tbsp. 1 quart = 4 cups = 2 pints. 1 gallon = 4 quarts
 
It's all in multiples of 2. Makes perfect sense to me.
 
user55340
Yep.
 
user41796
@RobertHarvey I have wondered how folk will view those lease agreements. I haven't heard of any that really made sense for the consumer.
 
user55340
Makes more sense than 10 to a programmer.
 
user55340
6:39 PM
(time is almost powers of 2)
 
user55340
I want a system where its 64 seconds to the minute and 64 minutes to the hour and 32 hours to the day, and 8 days to the week...
 
@GlenH7 The usual argument is that it will fix your energy costs. Say my average monthly bill is $300. They cut that in half, and charge me a $150 flat lease payment. But that lease payment never rises over 20 years, like electricity does.
They claim that electricity rises about six percent a year. And if they keep building wind farms, it will.
Gotta pay for all those blades somehow.
So in twelve years, my $300 electric bill is more like $600.
 
user41796
@RobertHarvey Without supplemental technology, there is effectively a limit on how much renewable energy generation can be introduced to the grid. Battery tech hasn't really come down in terms of price as the ultra-green would have hoped
 
user55340
(DNS TTL is/was based on 2^n seconds... and that was almost correct for a lot of things)
 
user41796
And I'm scratching my head at the 6% increase amount. Your bills may go up 6% per year, but that will be because you are consuming more. Rates don't rise that much that often.
 
user41796
6:43 PM
The utilities would get killed in front of the corporate commissions that provide oversight to rate increase requests.
 
We expect our consumption in 12 years to be exactly the same as it is now. It might actually be less, as we replace all of our incandescents and get more efficient appliances.
Unless we buy an electric car.
 
user55340
But we also toss a few computers in there too... and a bigger TV...
 
user41796
TVs, appliances, computers, all slurp down a fair amount of juice.
 
user55340
and a Playstation thats always on...
 
user41796
It used to be a given that load (ie. how much consumers consumed) would always increase
 
6:45 PM
My TV is a 50 inch plasma. I expect the consumption to drop at least 50% when I replace it. Computer are getting more efficient every year.
 
user41796
A lot of utilities got hammered in the recession when load curves flattened and then turned negative. Energy conservation efforts also push that growth chart into negative territory
 
user55340
That bit on the columbia river is a good read there too - the various subsides causing some fun with different sources.
 
user55340
(the hydro being something you can turn off eaislly and has other enviromental restrictions saying "this much must flow" and the wind being you can turn off eaislly... and you don't want to put too much power in the grid or other bad things happen)
 
user41796
@MichaelT wind and solar ramp rates can be killer to try and match. Really beats the crap out of the compensating generators that are trying to level out the amount produced.
 
user41796
They can actually disable on a wind turbine by turbine basis. Essentially they trigger a relay that decouples the blades from the generator. So the blades spin along but nothing is produced.
 
user55340
6:49 PM
Part of the problem in columbia valley they had was that the hydro had to pay the wind to turn off the wind for a bit because it was a very windy day and they were getting an excess level of snow melt too...
 
user55340
(link to that article again: forbes.com/sites/jonbruner/2011/10/20/… )
 
user41796
That's because of the power purchase contracts. Once again, money rules the day. :-)
 
user55340
>
At issue is what happens when too much electricity is on offer. The enormous supply of hydroelectricity during spring runoff can push electricity prices to zero—the BPA gives away electricity to local utilities for free when it’s forced to produce more than it wants to. Since wind producers enjoy production subsidies, they can push rates below zero, effectively paying other utilities to switch off their generators. Last winter, the BPA told wind producers under its balancing authority that it wouldn’t pay negative rates to them during high-water events.
 
user55340
7:22 PM
 
user55340
-2
Q: How to get the mobile no of the user who visits our site

user37894Here is an example page that gives much details about the user. Can anybody post some codes todo that. Goto 122.170.122.191/headers.jsp

 
user55340
I'm not sure what you are asking, and if I'm right about what you are asking (trying to get a phone number from a browser that visits a page), it can't do that. And even if it could do that, asking for someone to give you the code solution to it isn't appropriate for a Stack Exchange site. — MichaelT 1 min ago
 
user55340
7:57 PM
@AshleyNunn I blame Canada for some crazy internationalization.
 
user55340
2 hours ago, by MichaelT
btw, I want to poke at Canada for having three date formats. dmy, mdy, and ymd are all valid in given settings.
 
user55340
2 hours ago, by MichaelT
If speaking French, its dmy. If speaking English its mdy. If working with the government its ymd.
 
user15026
@MichaelT giggles Yes, it is confusing because Canada :P
 
user15026
We like to make things interesting!
 
user55340
(and you were giving me a hard time about using imperial temp scale earlier?!)
 
7:59 PM
@gnat: So vote to close it as Too Broad, or something. — Robert Harvey 2 mins ago
@RobertHarvey ^^^ outta CVs for today
 
user15026
@MichaelT shush that's different ;)
 
user55340
21
Q: Why do United States keep using "old" date representations and imperial system, while being in minority?

AthariSeveral facts: Vast majority of countries use International System of Units (SI), except US and a few other countries. Vast majority of countries use Celsius temperature scale, except US and a few other countries. Vast majority of countries use DMY or YMD date format, except US, Philippines and...

 
@gnat For a conceptual question, it's already pretty well specified.
 
user15026
@MichaelT That is rather fascinating.
 
@RobertHarvey okay I have few hours to ponder on whether to CV it, until my votes re-charge
 
user15026
8:06 PM
Also, I am employed! For money! I have training on Thursday! I get to convince people to sign up for credit cards.
 
user55340
@AshleyNunn And then you can make beer and whiskey cupcakes and take them on a world tour! ?
 
user15026
@MichaelT giggles you just want the cupcakes
 
user55340
and beer. And cupcakes.
 
user15026
8:20 PM
Those are excellent things, to be true.
 
user55340
8:58 PM
@RobertHarvey previous employer, routing application for deliveries... using a 3rd party routing thing, someone had actually written some unit tests for it. Every time the unit test ran, the all stores went offline for 30 minutes -- it chewed up all the alloted rate for half an hour in about 30 seconds.
 
user55340
I'd be curious to see the number of bounties offered over time in about a month or two. In particular, do we see more bounties now that the 'bounty advertisement' is also present?
 
@MichaelT have you ever done code profiling with VisualVM?
 
user55340
@Ampt some, I've generally used other tools. Netbeans has an excellent profiler (eghads, I said something good about netbeans...) and whatever we used at my former employer was surpisly good.
 
user55340
 
@MichaelT We used it in my last lab, and while it's great it gets... tedious
Looking to automate it some
 
user55340
9:10 PM
One guy wrote his own profiler for desktop apps from scratch (he was a 10x coder there) that specifically dealt with swing and its threading calls and such.
 
I may just ask the professor if we have to use visualVM or if others are acceptable as well
 
user55340
Ask if you can use IntelliJ (here's $0.05)
 
She loves IntelliJ :P
 
user55340
That said, glance at profiler.netbeans.org too
 
does that have a profiler?
if you tell me that theres a way to automate profiling within intellij, I'll buy it right now :P
 
user55340
Though I'd poke at Netbeans first.
 
user55340
The primary standout feature for me for Netbeans is the profiling.
 
Problem statement: I need to run a sorting algorithm through varying sizes of N from i (minimum size) to j (maximum size) with x sized increments. Right now I have to generate a new list of random integers of size N every time, start the process and let it load the file, upon which point it will pause, where I hook it up to visual VM by attaching it to the running process, and then selecting it for CPU profiling. Then I go back to the program and hit enter to start doing the actual calculation
I'm looking to automate as much of that as I can. Ideally I would turn it on, run it, and it would automatically collect the data and put it into something like a csv file
really its just VisualVM being bad. you can't ask it to start to a process, only one which is already running
and to take a snapshot, you have to phyiscally press the button
 
user55340
I'm still gonna say look at Netbeans.
 
hmmm... ok.
Thanks!
 
user55340
9:19 PM
 
user55340
Thats a menu from Netbeans.
 
user55340
And you can attach it from the start:
 
user55340
 
user55340
(whee! retina display vs non-retina display)
 
you have the latest retina?
is it nice?
 
user55340
9:23 PM
Its very nice. Very sharp text is easier on the eyes for working on things.
 
user55340
(as an aside, I use blogs.adobe.com/typblography/2012/09/source-code-pro.html for my code font)
 
user55340
 
interesting
I just use Courier New
 
user55340
The serifs on courier new are too annoying for me to code with.
 
user55340
 
user55340
9:29 PM
This is specifically designed so that characters that look similar but are problematic are otherwise distinct.
 
user55340
 
wait.. is that not monospaced?
 
user55340
There's some Courier for you.
 
user55340
Source Code is a monospace font too.
 
Oh, zero, L, 1
cmon
lol
 
user55340
9:30 PM
I know, but when your'e reading the code fast, its important to be able to distinguish them.
 
interesting
installing netbeans now
I'll give it a shot
 
All praise the new Date-Time API, statically linked libraries in JNI, and lambdas.
Wait...I don't get default methods. It makes interfaces abstract classes?
 
@ThomasOwens huh? that sounds silly
 
user55340
abstract methods are methods without an implementation. default methods are interfaces that have an implementation.
 
9:37 PM
@MichaelT I know that. But how is an interface with a default method different than an abstract class with a method that has an implementation?
 
user55340
If I add another method to an interface, suddenly all the code for things that implement it breaks.
 
user55340
This is to try to make that upgrade process less painful than breaking code.
 
If you suspect you were going to add more methods, why not make an abstract class instead of an interface?
Aside from the ability to implement multiple interfaces.
 
user55340
Because you can only extend one class... and yes, this does introduce a diamond problem.
 
user55340
10
Q: How does Java 8' new default interface model works (incl. diamond, multiple inheritance, and precedence)?

Alexander OrlovHow does this new interface model works and what is about the diamond problem that might arise out of this multiple inheritance character of this implementation and the precedence with which the interface implementations are used ?

 
9:40 PM
JDK 9, now with multiple inheritance, because we pretty much gave it to you anyway?
 
Back in my day we had to define our own methods when we used an interface!
 
user55340
> And if there are multiple default implementations of a method, then the diamond problem occurs and the compiler rejects the compilation.
 
@MichaelT That's not that bad, then.
 
user55340
Nope. Not bad.
 
The power of multiple inheritance with the inability to get into undefined behavior?
 
user55340
9:41 PM
The full block of text that is from:
 
user55340
> To address the diamond problem there is a precedence in which order an implementation is used: only if the class implements all default / optional methods of its interfaces, the code can be compiled and the implementations of this class are used. Otherwise the compiler tries to patch the missing implementation(s) with interface's default implementation. And if there are multiple default implementations of a method, then the diamond problem occurs and the compiler rejects the compilation.
 
I should start pushing the approval process for JDK8 tomorrow at work.
 
user55340
I'm an EE guy... tomcat is my container. So even though 8 is out, it doesn't mean much.
 
user55340
(Tomcat 8 which supports EE 7 is still in beta)
 
I'm really surprised it moves that slowly
 
9:44 PM
@Ampt That's not that slow
Much of this industry moves far slower than people realize until they've lived it for a while
 
June of last year?
still in beta for tomcat?
 
Mar 13 at 19:12, by Jimmy Hoffa
@MichaelT as opposed to the "distant future" - which is the future technology you avoided several years ago as opposed to the future technology you avoided just last week i.e. .NET 3.5 is a distant future, .NET 4.5 is a recent future
 
user55340
Given that only GlassFish (the reference) and WildFly (Redhat's) are out now for 7... everything else is still 6.
 
I was only half joking. The majority of the industry tends to be always in the middle of migrating to the next technology; which inevitably is something ~4+ years old
 
so glassfish is the premier Java EE webserver?
 
user55340
9:46 PM
JBoss, TomEE... even WebLogic (Bea, owned by Oracle) are still 6.
 
user55340
> GlassFish is the reference implementation of Java EE and as such supports Enterprise JavaBeans, JPA, JavaServer Faces, JMS, RMI, JavaServer Pages, servlets, etc. This allows developers to create enterprise applications that are portable and scalable, and that integrate with legacy technologies. Optional components can also be installed for additional services.
 
user55340
The thing is, you can't start coding for EE 7 until you've got the reference. That press release was about GlassFish being out.
 
user55340
Then everyone else has to match the reference - but they can't really start before if it means wasted work.
 
user55340
9
Q: Can we do something more useful when new users land on a protected question?

Jon EricsonIf you land on a protected question and are not able to answer (because you don't have 10 reputation earned on the site) you find this notice where the answer box normally lives: That's weird and a little hostile. The call to action assumes you are here because you're trying to solve a proble...

 
user55340
Gotta find out what question I protected.
 
user55340
9:59 PM
Ahh!
 
user55340
37
Q: How necessary is it to follow defensive programming practices for code that will never be made publicly available?

codebreakerI'm writing a Java implementation of a card game, so I created a special type of Collection I'm calling a Zone. All modification methods of Java's Collection are unsupported, but there's a method in the Zone API, move(Zone, Card), which moves a Card from the given Zone to itself (accomplished by ...

 

« first day (1292 days earlier)      last day (3697 days later) »