« first day (1827 days earlier)      last day (3168 days later) » 
01:00 - 20:0020:00 - 00:00

user55340
1:04 AM
Regarding the precise wording of your addition: Adding a conjunctive, a gerund, and a negation might not make the scope easier to comprehend, especially for non-native speakers. A more direct “This site concentrates on questions that can be answered with just a whiteboard, not on those that require access to a computer or to reference documentation” could perhaps be better, but also has a chance of confusing people to think we're a whiteboard-golfing community, with a chance of less-focussed question still being acceptable :S — amon 2 hours ago
 
user55340
@amon and saying gerund, you completely confuse the native speakers. ;-)
 
user55340
Noun: gerund ‎(plural gerunds)
  1. (grammar) A verbal form that functions as a verbal noun. (In English, a gerund has the same spelling as a present participle, but functions differently.)
  2. 2002, Dan Mulvey, Grammar the Easy Way, page 25,
  3. 2005, Gary Lutz, Diane Stevenson, The Writer's Digest Grammar Desk Reference, page 55,
  4. (grammar) In some languages such as Italian or Russian, a verbal form similar to a present participle, but functioning as an adverb. These words are sometimes referred to as conjunctive participles.
 
1:19 AM
howdy
A red–black tree is a binary search tree with an extra bit of data per node, its color, which can be either red or black. The extra bit of storage ensures an approximately balanced tree by constraining how nodes are colored from any path from the root to the leaf. Thus, it is a data structure which is a type of self-balancing binary search tree. Balance is preserved by painting each node of the tree with one of two colors (typically called 'red' and 'black') in a way that satisfies certain properties, which collectively constrain how unbalanced the tree can become in the worst case. When the tree...
Can somebody give me a practical real world example where I would want to use this as a data structure?
If I can search a B-tree in O(log n) time then what does this buy me?
 
hello?
sorry, chat was broken
iirc, red-black trees are always well balanced, meaning your worst case search time is guaranteed to be much smaller than generic binary trees.
 
merge sort on a binary tree is what? O(n log n)?
and this is O(log n) worst case?
not merge sort
that makes no sense
ughhh im so frustrated
I really wish I had completed and got my Computer Science degree
 
user55340
1:41 AM
@maple_shaft TreeSet/Map in Java is a Red - black tree.
 
user55340
> A Red-Black tree based NavigableMap implementation. The map is sorted according to the natural ordering of its keys, or by a Comparator provided at map creation time, depending on which constructor is used.
 
user55340
Take your classic binary tree. Lets do:
tree.add(5);
tree.add(6);
tree.add(7);
tree.add(8);
tree.add(2);
// what does the tree look like now?
 
user55340
We've added 5 items. Doing a 'tree.contains(8)' should be able to do it in two levels of decent if it was a well balanced tree.
 
practical example I'd think would be something like a router where it's more important that things not get spikey.
 
user55340
 5
2 6
   7
    8
 
user55340
1:45 AM
If your tree looks like that, it takes 3 descents instead of 2 for the well balanced one.
 
user55340
You'd really rather your tree look like:
 
user55340
  6
 5 7
2   8
 
user55340
But, you need a way to shift 6 back into the root position. That is where self balancing trees come in. Lots of variations on them, AVL trees (nightmares), red black trees, 2-3 trees...
 
user55340
Btw, for the Jetbrains lovers (yes, I'm one of them) - there's a new pricing model: jetbrains.com/toolbox
 
user55340
Going back to the "why do you want a balanced tree" - If you don't balance your trees, they can become degenerate and essentially become a linked list. Then a lookup on them is O(n) rather than O(log n).
 
user20683
2:13 AM
@MichaelT which then degenerate into matrices which then degenerate into graphs
 
user20683
for O(n^m) and O(c^n) complexity respectively
 
I have two pieces of advice for google interview:
1) Practice how to think about problems, not memorizing data structures
2) The answer to every question is Hashmap.
 
user20683
@durron597 That's quite literally true
 
Learning how a red black tree works is not useful.
You would be better served doing hackerrank problems.
Google is looking to hire people who can think. They don't care whether you've memorized what a red black tree is.
 
2:38 AM
I've read Martin Fowler's "Is design dead?"[2004]. He mentions that Extreme Programming proponents frown on the use of frameworks. But Fowler didn't write what the actual criticism is.
I've searched for articles or blogs, but haven't found anything.
 
2:49 AM
@durron597 Do you remember any of the questions that you got where answer was HashMap
?
 
3:27 AM
@Ixrec sir , being demotivated is also key factor for me ...... everything is going in wrong way ,i hope if i can restore my passion and work hard to get a decent job
 
 
2 hours later…
user55340
5:44 AM
@NickAlexeev frameworks are huge. Especially if you write them,yourself. YAGNI.
 
5:54 AM
@MichaelT for a person who knows java ,which bigdata is useful?
do you have any ideas?
 
6:19 AM
@MichaelT Is it safe to say that XPers have fewer disagreements with off-the-shelf frameworks (commercial or OpenSource) than with creating in-house frameworks ?
 
6:34 AM
as a blind guess, it might also be that they're okay with "libraries" but not with "frameworks", since the latter almost by definition drastically restrict your flexibility and adaptability
 
7:16 AM
Hi! I'm pondering on a very simple way to track hobby project status. It always takes time to continue something after weeks of no-work, and I'd like to reduce this time. Currently I'm rooting for STATUS file, which would be something like TODO+current_state+CHANGELOG. I'm also thinking maybe bug tracker could be the way, but I don't see a nice way to present "current state". I worry that this is too open ended and in discussion style, so I'm asking here. Any thoughts/experience?
 
 
1 hour later…
8:32 AM
@domen you rarely have a 'current state' for a whole project once it reaches a certain size. Rather a lot of parts of the project are in different states. That's why you would use something like TODO lists and project management software where you can create tasks, assign them to a developer, assign priorities and have a status for every single task.
 
8:45 AM
True. I was actually thinking this would be done for sub-projects. There's multiple projects, one developer and never enough time.
 
For smaller projects I normally would get around with simple files and comments in the code. Using version control can help also. Makes it easier to see what the last things where you worked on (and where most likely some work is left to be done)
 
My experience with project management software is that is requires quite some discipline to actually use it, so if I'm going that way it'd have to be simplistic, I guess.
I do use git, todo.txt, code comments for "local todo". Still takes me quite some time to figure out what I was doing after a few weeks/months of break.
 
This is a lot of time and project management software wouldn't help there that much. Mostly it makes no big difference if you write this information in a text file or a slightly better structured management software. The problem often is not to remember what you where working on but to find back into the actual details of the code. How was this done? Why did I make this decision? etc.
(Otherwise you git commit messages should tell you just that, what were the last changes and which files were changed)
 
9:09 AM
I partially agree, git log will tell me what I was working on. But git log doesn't know about "the big picture", which I guess can be just a prioritised todo list.
OK. Thanks! Discussing this has clarified my needs and desires a bit.
 
 
3 hours later…
12:02 PM
Happy Coffee Day
 
12:30 PM
@JimmyHoffa I don't have coffee today... also you are up early :o
 
12:55 PM
Modifiability versus Maintainability for quality attributes. In Software Architecture in Practice (3rd), they discuss Modifiability tactics for architecture as the set of things that you need to consider in requirements and architecture for how to make changes within time and budget. In ISO 25010, modifiability is one thing under maintainaibility, with modularity, reusability, analyzability, and testability.
I generally dislike how ISO 25010 breaks down product quality. It's not intuitive - it relies on their specific meanings of the words. I generally don't see a difference between compatibility and portability - both deal with installing and configuring software on different hardware and software environments. Yet they are two top level categories in 25010.
It seems like maintainability is something that engineers talk about. Modifiability is more customer or user focused. Modifying not only the software, but it's environment.
So I think it makes sense to talk about modifiability requirements, since that seems to be a broader term.
And of more relevance to more stakeholders.
 
1:14 PM
@enderland these are my insomnia months; aug-oct every year. No idea why.
 
@JimmyHoffa when you have insomnia, is it a "I'm exhausted and can't sleep" or a "I'm wide awake all the time?"
I find that I practically need 8 hours of sleep to function :(
 
@enderland the ladder, but when it ends I crash if I don't end up getting enough sleep. I typically get a good amount of sleep, aug-oct though I both get and need less, though I have had times where I couldn't sleep at all and had to take a sick day to crash during the day
 
I just trained myself to function on 5-6 hours of sleep in college. I'm going to maintain this life as long as I can.
 
1:29 PM
@ThomasOwens when I get tired, I go zombie mode hard, it's miserable. There's no inbetween awake and feeling like I'm dying with my eyes open. I think it's because when I was younger I spent years living on 3-4 hours of sleep and skipping nights altogether. I can't encourage sleep deprivation anymore, I suspect it catches up hard later
 
@JimmyHoffa 3-4 is way too little sleep. And I'd never encourage anyone to skip a night. I think I pulled an all nighter once in college. Never again.
Honestly, I think 6 is ideal for me. I do sleep more if I'm sick, though.
 
It seemed like reasonable behaviour to a younger version of me; I still functioned and had far more time to use. Much mistake.
 
Lots of things seem reasonable when you're younger.
 
user55340
@JimmyHoffa justgetflux.com
 
Indeed, one time I super glued an apple to a door knob.
 
1:34 PM
@JimmyHoffa Why did that seem reasonable at the time?
 
@ThomasOwens somebody put super glue in my vicinity. Always a mistake.
 
user55340
@ThomasOwens learning Haskell while drinking scotch.
 
@MichaelT I keep my monitors at 10-20% brightness and like 40-50% contrast always. I don't know how anyone can sit in front of a screen as much as we do these days with default settings.
 
@MichaelT Is there something like Flux for iOS that doesn't require jailbreaking?
If not, what the hell is Apple smoking?
 
I've been catching the sunset every day lately, which is frankly pretty great. Huge wall of windows in my office in front of my desk, and I'm sitting at my desk 6-630 each morning.
@ThomasOwens money, they have so much of it and they're too lazy to buy cedar chips.
 
user55340
1:38 PM
@JimmyHoffa its not the brightness, but the color
 
@MichaelT Need less blue.
 
@MichaelT aye, makes sense
 
user55340
The bluer the light, the more the brain is told "the sun is still up"
 
user55340
I don't use any 5500K bulbs on the living part of the house - its all 2700K light. Unless its a Hue, and then I can set it to whatever I need.
 
@MichaelT btw, how's it with two houses now? You're renting in Madison isn't it? What's the story with your place in Eau Claire?
 
user55340
1:41 PM
@JimmyHoffa Need to get it finished fixed up / cleaned up and then sold.
 
user55340
The cosmetic things like "repaint the window sills" because its peeling at the moment.
 
@MichaelT it getting into any disrepair sitting vacant? Finding raccoons trying to take up residence?
 
user55340
It isn't a "this is a problem" but rather "when people look at it, they'll knock a few $100 off the price mentally"
 
user55340
@JimmyHoffa I check on it, mow the lawn and such about every other week.
 
@ThomasOwens I have an app like that on Android :P
 
1:43 PM
@MichaelT you could kill two birds with one stone on that one: Try and find a construction capable tennant and give free rent if they do some basic labor and you buy the supplies
 
user55340
The only thing is a cricket in the basement.
 
@enderland I've used Twilight before.
 
user55340
its a nice idea, but not overly feasible.
 
I should install it on my new phone...
 
@MichaelT every other week are pretty big empty stints still... a lot can happen in two weeks. You should get some of that monitoring equipment setup inside if no one's there to just watch for like a water leak et al
 
user55340
1:45 PM
I shut off water at the intake into the house when I'm not there. There's a sump pump in the basement already.
 
I still think there are crackheads and raccoons (maybe crackhead raccoons even) are taking up residence. It's a sure thing.
Liking living in the city again?
 
@MichaelT I like the idea of Hue lights, but they are way expensive for me
 
user55340
I like living whenever I am. I'm not too attached to anything.
 
user55340
@enderland There are Lux which are dimmer only lights (2700K light temperature)
 
oof you could spend a pretty penny doing that throughout your house. But they would last literally forever. So there's that..
 
user55340
There's also a dimmer rather than hub coming out - slashgear.com/…
 
I've been drooling over the idea of one of those lightpack things for the back of my TV lately
 
Are those the things that mimic the colors at the edges of the TV onto the wall behind?
 
user55340
@JimmyHoffa I've done that in a few rooms already. The kitchen most notably. Try doing an indivdually addressed dimmer on track lighting any other way (at an affordable price)
 
1:51 PM
@MichaelT fair point
@ThomasOwens $80 each, and you can put multiple for better effects and they link up to eachother somehow
 
user55340
@ThomasOwens You could, in theory, try to do a 'looks like TV' but this is a bulb that changes color. Thats it.
 
user55340
The kitchen, for example, has two lights over the sink, two over the stove. I can turn either on or off and at night, on an alarm, the ones over the sink go into a 'nightlight' mode.
 
Raytheon is hiring people to work at NORAD Cheyenne Mountain to do operations and sustainment. I just want to know if there's a Stargate under there.
 
@MichaelT oh that's neat
 
user55340
1:55 PM
@enderland In the house I have four in the kitchen (eventually 6) on track lighting. Two in the dining room, and two in the bed room. I also have one hue above the computer, one next to the computer, and one on my night stand.
 
user55340
The computer one is for matching the color temperature of the screen and outside light. Right now, its a 5500K bulb. The one next to is the one I use for doing code - its in an accent light holder - I don't want to be "oh, look at how fast I can flash my main light different colors" when trying to work.
 
user55340
The nightstand dims from 2700K to 1900K from 8 pm to 10pm and then is a night light. It also fades to 6500K for 6:30 am for waking up.
 
@MichaelT whenever we own a place it might be nice to have some lights like that
though I really prefer diffuse lighting
 
user55340
 
user55340
 
1:59 PM
yeah, skylights are the best
 
user55340
That is artificial lighting.
 
user55340
> Professor Paolo Di Trapani of Italy’s University of Insubria spent over 10 years working on a sunlight emulation device called the CoeLux system. The concept aims to recreate artificial light as it exists beyond the walls and ceilings of enclosed spaces, and bring realistic illumination into spaces like subway stations, museums, or spaces where people are removed from the feeling of well-being that natural sunlight delivers.
 
user55340
>
The CoeLux skylight system utilizes three key elements to emulate natural lighting. Using proprietary technology, Di Trapani has incorporated select LED lighting to closely resemble natural light and the sun in the sky. The team then developed a complex optical system which mimics the sun and its rays using nano-structured materials to recreate in just a few millimeters the Rayleigh scattering process that occurs in the atmosphere. But making a ceiling blue with a false sun does not a realistic artificial light source make.
 
That's cool.
 
@ThomasOwens O_O the hell? That's bizarre, it's well known around here they gutted that place ages ago because it was ancient tech. They still "maintain" it, but it's just keeping people out mostly. Though who knows, the place is top secret, for all I know they spent 14 billion trillions to completely replace everything inside..
Either way, I wouldn't live in the springs if somebody threatened me with a patriot
 
user55340
2:01 PM
>
The technology is designed for providing the appearance of sunlight to spaces that could use it (e.g. hospitals, gyms, offices, underground parking structures), but it seems photographers could also make use of it as well for an artificial sunlight source in a studio — especially people who work in places with unpredictable or limited sunlight. However, the price would need to come down first: CoeLux currently costs £40,000 (~$61,000) to buy and up to £5,000 (~$7,600) for installation.
 
@JimmyHoffa As far as I know, it's still a radar monitoring facility. Isn't it where the Air Force Space Command is?
Or whatever it's called these days. The people who track satellites and space junk for the Air Force.
 
@ThomasOwens NORAD - yes, Cheyenne Mountain? They moved out of there I understand because it's a pain in the ass to remove and replace all the equipment when it's literally installed in a mountain, and everything in there was decades old
 
"Which are advantages and disadvantages..." make this question a very poor fit for Programmers - it would be quickly voted down and closed over there, see What is the problem with “Pros and Cons”? Recommended reading: What goes on Programmers.SE? A guide for Stack Overflowgnat 29 secs ago
 
but like I said, Cheyenne Mountain is all top secret so who knows. Maybe they moved back in, it was fairly well publicized years ago though when they were turning the place down.
 
2:03 PM
^^^ as far as I can tell, that MSO answer recommends dumping garbage at us
 
@JimmyHoffa The picture on the website has the Cheyenne Mountain Complex entrance that they filmed for the outside scenes of Stargate and it's one of three locations that they are hiring for. So something is there.
 
@ThomasOwens aye, something indeed. Government facilities never completely go dead, so meh. Either way, like I said you don't want to live in the springs. Especially from boston. Don't show up at the nearest mega church and you'll have folk at your step every week..
 
@JimmyHoffa I have no interest in moving.
I still haven't finished the beer here, yet. Can't move out west until after that.
Speaking of beer, how are they making beer in California still? Beer takes a lot of water, and they have a massive drought.
 
@ThomasOwens wow, that's like "I can't walk on my feet yet, I haven't finished this marathon on my hands.." pfft the beer out here is nectar but you're busy drinking that rubbish..
;P
@ThomasOwens they also have a massive bank account
 
@ThomasOwens they are still farming all sorts of water-intensive things, too
 
2:11 PM
@enderland That, too. I don't get it.
 
user55340
@ThomasOwens Because of the water shortage, the price of the water intensive items is going up. So farmers with senior water rights are economically motivated to switch to selling the most water intensive crops.
 
user55340
There is also no restriction on drilling in the aquifer. This is quite troubling as farmers can do a "spend $10k for a deeper well" type things but the town next door can't do the "spend $1M for a deeper well" - there are some parts of California towns that have no running water because the aquifer dropped below the well level.
 
user55340
 
user55340
Then... as a Wisconsin resident, I've gotta point out the California dairy problem too. It takes 122 gallons of water to make 1 gallon of milk (ref: blogs.lt.vt.edu/water/2015/02/07/… )
 
user55340
California is the largest producer (by volume) of milk in the US. Why? Because back before refrigerated milk trucks and the ability to move resources from one part of the country to another quickly, the government subsidy for milk is based on the distance from Eau Claire, WI. So, want the most government $ for making milk? Make it the furthest away from Wisconsin you can... California.
 
2:22 PM
Yeah, water is going to be an interesting problem in the next 100 years
 
user55340
(ref: and fun reading for east coast readers: bostonglobe.com/business/2013/06/08/… )
 
user55340
> Thus begins the unlikely tale of how the federal government relies on Boston to determine dairy subsidies across the country. Befitting the poetry of government code, it begins with term known as “Boston Class I Milk.”

This bureaucratic concoction is theoretically linked to the price of 100 pounds of milk produced on a farm in Eau Claire, Wis., and then shipped to a processor in Boston. If the price falls below $16.94, farmers around the country get a monthly check from the government. If it goes higher, no check.
 
user55340
While it appears that some of that 'distance from eau claire' is gone, there is still the huge amount of investment of dairy in California (and apparently some other restrictions): news.minnesota.publicradio.org/features/200205/…
 
user55340
> The new farm policy moves the focus of the nation's dairy industry from Eau Claire, Wis., to Boston. Under the old system, Eau Claire was seen as the center of dairy country. The federal government paid dairy subsidies based on how far a producer lived from the western Wisconsin city. The greater the distance, the more a producer was paid.

Now subsidies are linked to a base price for milk in Boston. If it drops below $16.94 per 100 lbs. of milk to the dairy farmer, then the rest of the country's dairy farmers will get ripple payments from the government.
 
2:26 PM
> No @gnat, not every failed audit question is a duplicate of every other failed audit question.
 
@durron597 that one, per my reading, is. I checked the answer in the audit - picking no action needed in there seems to be fairly well covered in the dupe
 
@gnat At minimum, that is a first post MSO dispute, not a late answer dispute.
 
@durron597 this also have been covered in one of the dupes of that canonical. Thing is, late answers, just like first posts, cover answers from new users - that makes it applicable
 
If I'm looking for input about my specific failed audit, it's not a duplicate.
It is not a question about failed audits in general.
 
except for the minor difference using FP/LA words, it looks like fit:
13
A: Failed and banned for user who answered the question correctly?

user289086This is a first post review. You clicked "no action needed" or attempted to upvote. Either way, that fails the audit. Why is this an issue? Because first post reviews are one of the first sources of feedback to the OP about the quality of the answer and possibly working on helping the OP to im...

replace "first posts" with "late answers" and it will be just the case
 
user55340
2:44 PM
Ohh... this is right up @JimmyHoffa 's specialty...
 
user55340
 
user55340
>
On Earth, the downward drag of gravity overwhelms the capillary action. To test whether the design worked, Mr. Parr took the space glass to Bremen, Germany, to a 480-foot tall laboratory facility known as a drop tower. Whisky was poured into the bottom of the glass, which was then placed into a cylindrical capsule and winched to the top of a vacuum-sealed shaft. Dropping the capsule down the airless shaft creates nearly zero-gravity conditions for about four seconds, until it makes a cushioned landing at the bottom.
 
You really think they allow alcohol on the space shuttle?
 
> In 1969, Buzz Aldrin took communion after landing on the Moon, sipping wine from a small chalice. In the Moon’s feeble gravity, he later wrote, the wine swirled like syrup around the cup.
 
user55340
2:47 PM
> NASA packed spirits for its astronauts once — brandy to celebrate Christmas during the Apollo 8 swing around the moon in 1968. But Frank Borman, the commander, ordered that the brandy remain unopened. (James Lovell later auctioned off his two-ounce bottle, still unopened.)

In 1969, after Apollo 11 set down on the moon, Buzz Aldrin held a private Communion for himself with wine and bread. “I poured the wine into the chalice our church had given me,” he wrote in an article published in the magazine Guideposts the following year. “In the one-sixth gravity of the moon the wine curled slowly
 
user55340
This isn't for NASA though... its for that day that space tourism becomes available.
 
user55340
NASA isn't sending any manned missions to space though, its all either from the Russians (who have had cognac on the Mir) or some day through private contractor.
 
user55340
@NickAlexeev It is important to consider that XP evolved in the Smalltalk world and largely centered around C3 ( c2.com/cgi/wiki?ChryslerComprehensiveCompensation en.wikipedia.org/wiki/… ). I am unsure how many off the shelf frameworks there are for Smalltalk.
 
user55340
3:00 PM
> Software development in the 1990s was shaped by two major influences: internally, object-oriented programming replaced procedural programming as the programming paradigm favored by some in the industry; externally, the rise of the Internet and the dot-com boom emphasized speed-to-market and company growth as competitive business factors. Rapidly changing requirements demanded shorter product life-cycles, and were often incompatible with traditional methods of software development.

The Chrysler Comprehensive Compensation System (C3) was started in order to determine the best way to use ob
 
user55340
So it is important to place XP's original philosophy in this context.
 
user55340
> Extreme Programming was created by Kent Beck during his work on the Chrysler Comprehensive Compensation System (C3) payroll project.[5] Beck became the C3 project leader in March 1996 and began to refine the development methodology used in the project and wrote a book on the methodology (in October 1999, Extreme Programming Explained was published).[5] Chrysler cancelled the C3 project in February 2000, after seven years, when the company was acquired by Daimler-Benz.
 
3:39 PM
 
user41796
Joe - First off, you're on Programmers.StackExchange, and not on SO. Second, gnat is a community member and is not an employee of SO or StackExchange. Third, the community has decided that questions of this sort simply don't work for the site. It's been tried, and it didn't work out at all. — GlenH7 13 secs ago
 
@GlenH7 lost cause probably :P
 
user41796
s/probably//
 
Hi... i just wanted to ask if it's better to use java.io or java.nio for creating a library class for handling output.
hello? its quiet all of a sudden.
 
user41796
The room does that.
 
user41796
3:52 PM
In this case, it just means we don't know.
 
Bummer
Any "go there" or "ask here" advice?
 
user41796
 
user41796
Looks like there was a brief conversation about it a while ago
 
user41796
Durron's in the room currently, so you could ping him after reading that portion of the transcript
 
ok... sure... thanks
 
user41796
3:54 PM
Note that (almost) all of us are working professionals who keep this room up in another tab. So we'll drop in and out as work duties permit during the day
 
Oh. @durron597 you know about Netty? I was wondering if the UDT implementation was a wrapper or a native Java implementation that was truly cross-platform.
 
@ThomasOwens I know how to use it, I don't know how it's written.
 
user55340
3
Q: Java IO vs NIO, what is really difference?

kevindI'm quite fond of Java NIO and I really want to apply Java NIO to my current system, but when I created these samples application to compare between Java IO and NIO, it made me quite disappointed. Here are my 2 samples (I don't put all the source code) Java IO public class BlockingServerClient...

 
user55340
11
Q: how to choose java nio vs io?

jiafuAs we had known, If we want to use traditional IO to construct server, it must block somewhere, so we had to use loop or one thread one socket mode, So nio seem it is better choice. So I want know if the nio is better choice forever?

 
user55340
27
A: NIO Performance Improvement compared to traditional IO in Java

claymore1977NIO vs IO is a pretty fun topic to discuss. It's been my experience that the two are two different tools for two different jobs. I have heard of IO being referred to as the 'Thread per Client' approach and NIO as the 'One thread for all Clients' approach and I find the names, while not 100% acc...

 
4:41 PM
@ratchetfreak Are you there?
Can someone look at a code snippet for me and tell me if they see a race condition
 
user41796
@durron597 Survey says "yes, there's a race!" :-)
 
user41796
link?
 
You avoided my mistake. +1.
 
4:53 PM
I feel like there can be an update between the while loop ending and updating being set to false.
I'm not sure how to fix it though without a lock
 
user41796
@durron597 Yes, it appears to me that you could have that case
 
user41796
does the drainTo() completely empty updates?
 
@GlenH7 yes
 
user41796
why loop on updates.isEmpty() then?
 
@GlenH7 rolfl's version doesn't have a race condition but it seems to me it creates more tasks than necessary.
 
user41796
5:02 PM
and / or, call the atomic boolean after the drain call
 
I could put a lock in there.
fewer tasks with a lock seems superior to more tasks with no lock.
 
user41796
Assuming no gathered performance results to the contrary, I think that tightly scoped locks are very valuable tools
 
user41796
Granted, there is a cost to them. But what level of maintainability am I purchasing with that cost? If someone has to scratch their head and think a while before determining if there's a race / problem in there, then I tend to prefer the more easily maintained version
 
derp
@GlenH7 NOW look.
No that doesn't even work
 
user41796
boolean isEmpty = !updates.isEmpty(); seems to be reading backwards. would think you'd want boolean isEmpty = updates.isEmpty(); Note the absence of the negation
 
5:12 PM
@GlenH7 And that's why it doesn't work.
 
user41796
If you fix the logic, I think it should be okay though
 
0
Q: Class managing queuing updates from another thread, Version 2

durron597This is an updated version of: Class to manage updates coming in from another thread Changes: I removed the race condition, I believe Removed the need for checking for InterruptedException, and therefore a LOG in this class Added a lock to ensure that all updates are properly processed Removed...

 
5:53 PM
@durron597 consider rethrowing InterruptedException (wrapped in some runtime exception). As long as you don't know how to handle it, nor where it comes from, not even if it may happen at all, letting application fail makes better sense (took me few years to build a habit to handle IEs this way, wish I would learn this earlier)
 
@gnat I don't catch (InterruptedException) in the new version.
 
@durron597 I see the catch in ExampleTask.run
@durron597 a minor note regarding code style, it feels slippery when concurrency utilities are mixed with primitives, synchronized with AtomicBoolean. In cases like that I prefer using Lock instead of synchronized
 
@gnat You are welcome to answer the Code Review question
 
6:16 PM
@durron597 I am uncomfortable with CR model, need to learn what makes a legitimate answer over there (tried help center, that didn't help, guess need to check their meta)
 
@gnat Just post whatever feedback you want as long as it's specific and backed up.
You don't need to cover all the things
Just any of the things you think are important.
@gnat You can chat about it in their room, they're very active: chat.stackexchange.com/rooms/8595/the-2nd-monitor
 
user41796
@durron597 You mean to say they don't spend all their time discussing the finer points of scotch?
 
@GlenH7 s/scotch/ SCOTCH!! /
 
user41796
6:35 PM
That should have been understood....
 
user55340
7:01 PM
@GlenH7 BoozeReview.SE?
 
user41796
How is the beer beta doing?
 
@GlenH7 Why is Beer categorized "Culture" but Coffee is categorized "Life"?
 
@GlenH7 0.1 questions/day? that's.. not even 1/week
 
user55340
Coffee is life.
 
user41796
7:16 PM
Time for an epic MSE rant....
 
I just ran out of close and delete votes so I'm up for reading a rant
 
user41796
It is Friday. And I suspect the MSE voting would be fierce
 
user55340
Though more seriously about beer.se, the aficionados would probably rather discuss than answer.
 
@MichaelT this is probably true of many things that have SEs already
good thing they all have chat rooms
 
user41796
I still think they should have opened it up to wine & liquors as well as beer
 
7:23 PM
@GlenH7 LINK NAO
 
^
 
@GlenH7 aa.stackexchange.com?
 
user41796
@ThomasOwens I don't have the gumption or creativity to come up with that rant at this point
 
I suppose saying something like, "I don't really drink" is going to get me kicked out of here :P bwahaha
 
I want to get a remote job but I am pretty confused about the job requirements.
I have practiced as web developer, however, the requirements are alot.
 
7:24 PM
@FreeMind which job? do you have a link?
 
@FreeMind That's not uncommon.
 
:23892728 lololol
 
@enderland Wait. I will give a link
 
A job posting is usually a list of everything a company wants.
 
user41796
My joking is going to get me kicked... :-)
 
7:25 PM
lol
actually I should not even paraphrase the pile of crap that was the prequel trilogy
 
@enderland Something like these, there are lots of jobs being posted each week
Anyway, I don't have self confidence about all the required skills and probably know one or two
 
@FreeMind I don't see anything out of the ordinary.
Their ideal candidate will have all of those. The more you have, the better.
 
@ThomasOwens for instance I know wordpress but not drupal
 
@FreeMind So? It says "or".
 
One thing to keep in mind: if you aren't sure if you are qualified, don't make that decision for them - let them decide
 
7:28 PM
Agile development methodology -> I don't know this at all
 
It doesn't say "Drupal and Wordpress and other open source CMS applications". They want someone who is familiar with Drupal or Wordpress or another open source CMS application.
@FreeMind So that's one thing. No big deal. I'm sure you can learn what you need to on the fly. Even if you worked in agile environments before, you wouldn't be familiar with their flavor of agile.
 
@ThomasOwens I know wordpress to make basic plugins and some upper intermediate themes. I haven't done bombastic style projects.
 
@FreeMind Again, so what? This is their dream candidate list.
 
@ThomasOwens What about age?
 
@FreeMind Do you have 5+ years of experience?
 
7:30 PM
Yeah, I have 5+ years of experience on my own as a self taught programmer. I haven't worked for any company.
 
what's the worst that happens @FreeMind?
you apply, and they say no?
 
@FreeMind That may be a problem. Have you done freelancing projects or do you have open source projects posted somewhere?
 
@enderland No, that's not what I am worried about. What if they say yes and ask me for something I am not fully aware of? Something which might take time to learn :|
 
I would only worried about that if you are going to actively lie to them
Companies accept people in roles they know they have to learn in
 
@ThomasOwens No. I don't have GitHub account. Probably that's the reason I asked my question to give me advice regarding preparing myself to gain some self confidence.
 
7:33 PM
@FreeMind Their interview process should be sufficient to see if you are capable of perofmring on their timeline.
 
@enderland I am not a liar and that's why I am scared to tell them I might not be ideal.
 
@FreeMind I think you're missing my point, companies often are ok with someone not being perfect and needing to learn
I have a friend who just got hired as a test engineer doing Python and had never written a single line of python and had minimal programming experience, but the company was willing to hire him because they thought he'd be a good fit anyways
 
@ThomasOwens How can I prepare myself for interview? Can you give some hints about interview processes so I will be prepare myself to fulfill their expectations?
@enderland That's really motivating. However, I have written bunch of python scripts, mostly, webscraper for information gathering. Like a bot which automatically posts for a particular site from various resources. Anyways, I didn't fully bring that bot to a framework which can be applied to different projects.
I have played around Web App pentest a bit and have knowledge of server attacks.
But these skills seem to be pointless when it comes to real life, like hunting a job, sadly.
 
If you believe you are never going to get a job, that attitude will come across in all your interviews
 
@FreeMind I don't know what their interview process is. There are a whole bunch of interview questions on The Workplace, though.
 
7:38 PM
@enderland As I said, I think I will get a job but will be behaved as someone who is not efficient :|
 
Everyone is that way when they start a new role
 
Companies realize that. Perhaps you should look for entry-level positions.
 
@ThomasOwens I know. I just want to know what an interview question for a php programmer would be look like
 
In those, companies are expecting to have to do more training and mentoring.
@FreeMind I don't know. It depends on the company.
 
@ThomasOwens ask me a question, supposing you're an interviewer
 
7:40 PM
@FreeMind I haven't touched PHP in years. I do mostly design and architecture now, and process engineering in aerospace.
 
"Name some things you dislike about PHP?"
 
Ixrec: you mean a php feature or some programming traps because of php language design?
 
@FreeMind either will do
 
@ThomasOwens What would you do as a aerospace engineer? Do you do programming? What language?
@Ixrec: I hate include() , print() , lack of sanitization, like getting user input recklessly
 
@FreeMind I'm not an aerospace engineer. I'm a software engineer. Check out my CV.
 
7:43 PM
imo the best interview questions are simply giving the candidate a prompt to start talking about stuff, organically demonstrating how much they know (and care) about all this programming stuff
 
and tons of other things.
 
I work in C, C++, and Java when I write code. But I don't write that much code anymore. Maybe only half my time.
 
e.g., anyone who actually knows PHP (I don't) will immediately be able to tell from the answer you just gave if you've actually done PHP
 
Ixrec: The question was a bit cheesy since the PHP is not a flawless language by its nature.
 
I didn't spend a great deal of time thinking about it
 
user41796
7:45 PM
@FreeMind Every language has it's poorly implemented features
 
The worst interview questions are when you're expected to recite reference information from memory. Things like method signatures or minutiae about a technology or an API.
 
in SO Close Vote Reviewers on Stack Overflow Chat, yesterday, by cimmanon
@rene i think the only way to end the crap in the php tag is to build a delorian and go back in time and prevent the language from being created in the first place :p
 
if they care about a specific language they might show you a small blob of code (simple enough you can parse it all in a few minutes) and ask you a bunch of questions about what it does
 
user41796
The key behind that question is "have you used the language enough in order to discover what the warts are?"
 
OK. I'm out for a long weekend. See everyone on Wednesday.
 
user41796
7:46 PM
@durron597 And I thought I was being harsh...
 
cya
 
@durron597 A witty remark :)
@ThomasOwens Have a good day. BTW, do you have Github?
:D
 
@GlenH7 yeah... cimmanon doesn't pull any punches :-P
 
user15026
@ThomasOwens Have a great weekend :)
 
@ThomasOwens take care!
 
01:00 - 20:0020:00 - 00:00

« first day (1827 days earlier)      last day (3168 days later) »