« first day (830 days earlier)      last day (3486 days later) » 

13:00
@Quill I hate people who write the indexer at the identifier
@nhgrif no volatile is about Tread-Local caching
There's a special room in hell for them
also what Jeroen says
volatile is something to do with sharing the variable between threads
volatile says: "When accessing this, refresh it from the shared cache"
13:01
Atomic versus non-atomic has to do with variables and thread-safety too.
doesn't mean it can't be outdated.
it also doesn't guarantee consistent state between threads
I don't know at all what volatile is exactly. And I only barely know what atomic vs non-atomic actually is...
Fortunately, I just write perfect multithreading code anyway.
Also, this is open for upvotes:
0
A: C++ alternative to exceptions

nhgrifI'm not familiar enough with C++ to know their standards, or what the elders consider to be the best way of dealing with errors are (and C++ is definitely a language of elders), but I can give you some insight on what another equally old object-oriented language does to handle errors (and it's no...

13:12
o/
Greetings
been in a meeting all day..... ;-;
@Mat'sMug I wasn't really trying to game the badge, I thought maybe they were close enough to warrant what I did, but I think that some questions are just tagged incorrectly. also I thought it would give me a "are you sure" alert message, but that is beside the point
That sucks
@EBrown that is something from the code I borrowed. I need to learn about those more so that when I code something that needs them, they actually pop into my head. I forgot about them as well
Guess what day it is?
13:18
@DanPantry My boss out of nowhere decided that he wants 2 distinct templates with different HTML to work exactly the same with a shared HTML.
@IsmaelMiguel Well, I mean, that depends what you mean by "work exactly the same". Functionally (JS)? Look the same (CSS)? same content?
@Malachi DataContracts are extremely handy, I forgot about them when I wrote my code.
@DanPantry Look the same, same content and must be valid and be 100% reliable
They basically allow you to take any type of structured data (JSON, XML) and convert it to a POCO in C#, without having to write custom serialization/deserialization. (As I did for mine.)
@EBrown they are a data structure for holding information right? but they have restrictions
13:19
@IsmaelMiguel That doesn't make a lot of sense, HTML is the content. Why does he want that?
@DanPantry He wants me to write HTML and PHP once for multiple templates. Those templates share nothing in common
Except jQuery
@Malachi They are more than that, they are data structures for mapping a structured document to an object, using Attributes.
good luck with that. That sounds like the sort of boss that should be describing what he wants rather than how he wants it done
@IsmaelMiguel
If I upvote a Close Comment (I.e. someone put in a close-vote with a custom reason, so it made a comment), does that automatically cast a close-vote?
@EBrown I don't think so
13:22
Upvote was not meant to be past-tense.
@DanPantry He just wants that I don't write the same code for multiple templates. But he forgets that different templates with different bases use different structures
Don't know what to suggest sorry @IsmaelMiguel. just feel bad for you :( good luck
2
Q: General improvements to performance comparison application

Aaron BertrandI am a casual C# programmer, not formally trained in OOP at all; mostly I focus on Transact-SQL in SQL Server, and so when I write C# apps I get grief about the constructs and methods I use. Here is a simple app I wrote for this blog post - it was not meant to be a production app, and performance...

@DanPantry Don't feel bad. I do what I can. Yesterday a client asked me to print a sheet that was a scan of a print of a scan of a document that was 60% the size of an A4 sheet. He wanted it to fill the whole sheet.
If I managed to withstand that, I can handle my boss
@QPaysTaxes Which one is he?
And why the swearing?
Dude, you should relax and grab a beer
13:39
Greetings, Programs.
-1
Q: Code takes too long to execute

user2015this code basically checks for four types of alarm flags in .ItemArray[5] to .ItemArray[8]. if an alarm flag is true then its corresponding setpoint is checked for realtime value. the setpoints arein .Itemarray[1] to .Itemarray[5] and the real time value is in engValues[i] if an alarm exists a ro...

@Donald.McLean Monking, Don.
@Donald.McLean Hello, world
@CaptainObvious Wow! Hello @Aaron Bertrand
0
Q: Using line count to break a while loop in bash

Dan_the_manIs it possible to use a line count to break a while loop in bash? I have the following code but it doesn't break and infinitely runs: wc -l Database.faa > counter perl -p -e 's/ /\t/g' counter | cut -f6 > temp; mv temp counter while ($counter > '0') do # some commands wc -l Database.faa > co...

13:57
please feel free to join us in The 2nd Monitor we would love to discuss CR Basics with you to help you get acquainted with our site. — Malachi 7 mins ago
@Donald.McLean Greetings, user
that question will probably go hot soon
Should this not be on Code Review? — IKavanagh 18 secs ago
14:12
@Malachi Why?
15 mins ago, by Malachi
@EthanBierlein --> http://stackoverflow.com/users/61305/aaron-bertrand
Aaron is a smart guy, it's interesting to see him here on CR.
@EBrown first post queue even! lol
@EBrown did you see my comment about assigning the connection string inside the for loop?
@Malachi Yeah, I added a bit about that in my answer:
> I also recommend you take Malachi's advice on the connection string.
he didn't post actual code though... some of it is not the actual code that he is running.
14:15
It may not be actual production code, but as far as the question is concerned, this is the actual code he is concerned about.
@EBrown right
@EBrown Not to be a pain, but could you please not call me "Don". Though "that annoying Scala guy" is fine. :-)
@Malachi That's a link to a SO user with SQL experience. Why should some question go hot?
@Donald.McLean Alright "annoying Scala guy." :)
stuff from comments should be quoted because they can disappear
14:15
You forgot annoying.
@EBrown That's Mr. Stargazer for you.
@Mast he is a high profile user from stack and from the SQL community
I knew who he was right away
He actually helped me a lot with an issue I was having on DBA.SE.
@Donald.McLean You don't want to sound like a mafia boss? :p
I thought I had recognized the name, it didn't click until I looked at his profile.
14:16
@skiwi Ummmmm, no.
@Malachi I know, but how does that help a question get hot?
@Mast Some people stalk high-profile users.
3
@EBrown Why?
@IsmaelMiguel Because they can? Some people just do. "Jon Skeet post, better upvote because Jon Skeet!"
I smell a troll...
14:18
That must stink
I gotta get to work
This was the DBA.SE post Aaron helped me out with: dba.stackexchange.com/a/98588/60094
Hey, Bjarne Stroustrup has one post on SO and it has many upvotes. I let you guess why.
0
Q: Query performance of this Select Where each Column is a Select

WiiMaxxi would like to know how to improve the performance of the following Query: SELECT Kunde.Nachname, Kunde.Vorname, Kunde.Debitorennummer, sum(Abmeldestatus) AS Abmeldestatus, Ab1.Fruehstuck, Best1.Menu1, ...

@Morwenn Who?
14:20
You may want to ask your question on Code ReviewLucky 11 secs ago
@IsmaelMiguel That one guy who created C++.
@IsmaelMiguel stroustrup.com
@EBrown Couldn't the webpage be any more 90s?
@IsmaelMiguel He was one of the original C++ guys, what exactly do you expect?
14:22
A better website?
He's probably not exactly a proficient web designer.
There's tools for that
then again he's rather awesome at ancient black magic rituals
4
Holy woah.
Nah, he's still active and actually like the ideas that make the language simpler and more usable.
14:23
I'm halfway to Mortarboard from that one answer.
@Vogel612 No, those would be the designers of Haskell.
@Morwenn I met him at a conference.
@Donald.McLean That must have been pretty cool! :)
I haven't met any famous people, yet.
you're young
14:25
@Morwenn You just mixed C++ and simpler
4
@EBrown He was very quiet and focused.
~typing...
@Donald.McLean Not surprising, he seems like a very intelligent guy.
anyone want to weigh in on whether to use this. in java? i saw an answer today that recommended using it for C#
@skiwi I thought it was forbidden to use those two words in the same sentence?
14:26
I have talked with Guido Van Rossum on Twitter, but that's about it.
@skiwi I know. If we could remove some stuff from the language without breaking retrocompatibility, some things would be both powerful and simple.
I've shaken hands with someone who has shaken hands with our Prime Minister, who has shaken hands with lots of presidents/PMs/kings, does that count too?
@bazola It depends on how you name things. It eliminates ambiguity between local and class-level variables.
I always use this, as looking at that in particular I can immediately tell where my data comes from.
i like to use it All the time.. but i come from objective-c where you are using self. all the time so I am used to it
I've met some people that are interesting to me, but it's hard to say that they're actually "famous". Larry Niven, Poul Anderson, Steve Jackson, Catherine Assaro.
14:27
I've had an answer recommend to stop using it in my code
but the counter argument is that you can tell immediately anyway based on the color in the IDE?
@bazola In Java or C#?
well i assume both but i am talking about java and eclipse
Ah, I don't use it much so I cannot really comment.
I can't use Eclipse.
I know VS2015 has started recommend not to use this within methods in a class/struct.
14:29
@Donald.McLean Niven the writer?
hmm
@Mast Yes
@EBrown Why?
i wish that the programming world would come to a consensus on what the best practice is for this
@EthanBierlein I don't know, let me post a screenshot to show you though.
14:31
@bazola The "programming world" rarely comes to a consensus about anything.
11
@bazola Use whenever best applicable ;)
For reasons (unknown to me) Microsoft recommends against using the completely fully qualified names.
@Donald.McLean You mean like Programmers.SE and their scope?
9
@Donald.McLean I've read one of his books, very impressive.
It wants me to shorten string reCaptchaResponse = form[ReCaptchaValidator._ReCaptchaFormCode]; to string reCaptchaResponse = form[_ReCaptchaFormCode];.
@EBrown does the underscore already indicate it is a member variable in C#?
14:33
hi everyone
@EBrown that's just because you guys don't differentiate in casing between Classes, Properties and about everything else
Greetings
@Mast I've read almost all of his books. Though in truth, his writing has some serious limitations.
@bazola I use _PascalCase for private variables, often times.
I just came across this post at stackoverflow meta that I figured people here should be aware of: meta.stackoverflow.com/questions/302350/…
14:33
that makes C# code so damn confusing
2 hours ago, by Grima Wormtongue
0
Q: Feature request: add blurb about Code Review in "How to Ask"

Hunter StevensRight now, when someone creates a new question on SO, they see the "How to Ask" box with the following: Is your question about programming? We prefer questions that can be answered, not just discussed. Provide details. Share your research. Often with "newer" users, I see questions...

thanks for the heads up, though
I guess I didn't scroll up enough in the chat messages
@Mast Shots fired.
@Vogel612 Casing for public and, IIRC protected members should always be PascalCase, private should be either _camelCase or camelCase. I've always been in the habit of _PascalCase for my private members, though.
It matters not what it is, more or less what the scope is.
I definitely prefer Java policies...
private and protected stuff is camelCase, just like methods
classes are PascalCase
and constants are SHOUT_SNAKE_CASE
Neither of those are unlike C#.
Except constants in C# follow the casing rules of their accessibility.
14:37
Except that methods are PascalCase.
and Properties are, too
If they are public.
where properties are just ... fancy fields.
Not sure where the other resource is.
Seems this one doesn't mention private or protected members.
Only members in general.
@Vogel612 They're a little more than that. They allow for code to be placed inside them, which means you can do all sorts of fancy things.
14:39
@Vogel612 Properties replace the Java idea of getter and setter methods.
And instead combine them into a single, accessible object.
Sounds an awful lot like JavaScript magic.
which is a PITA because getters and setters shouldn't have side-effects
@Mast Nope
at worst you can have some checks that reject invalid values
14:40
So instead of type getPropertyName(), or setPropertyName(type variable), we just use PropertyName for both.
or lazy initialization
And Auto-Implemented properties are wonderful.
Instead of having to:
1. Make a field.
2. Make a getter.
3. Make a setter.
You can:
1. Make a property.
(Where the first three steps are Java, and the last step is C#.)
Exactly. C# Properties are ultimately better.
@EBrown which is promoting violations of the Principle of Least knowledge by simplifying Code.That.Has.Way.Too.Many.Dots.In.It
@Vogel612 Properties have no more dots than methods...though.
14:42
That's why Groovy is awesome, you can write Java, but then more awesome
In Java, you would, player.getName();. In C#, you would player.Name;.
Make a property foo, set it by calling setFoo(stuff) and get it by calling getFoo()
@Vogel612 Gigaclass.Megaclass.Superclass.Class.Subclass.Property.get()
The C# convention is actually shorter to write than the Java one.
And I believe you can access foo directly by instance.@foo or some Groovy magic like that
14:43
@Mast that'd be nested static classes for java
in C# you have no idea what that is exactly and which is a type and which is a value
And the nice thing is, it's more natural.
@Vogel612 Do you have a demonstration of the differences? I'm not sure what you mean.
Exactly ^^
anyways
/religious war
@Vogel612 I love explicit strong typed languages. You always know what you have.
I get the feeling that this has turned from a discussion about properties to a mini holy-war.
14:45
@Mast not if Classes and Properties look the same
@EthanBierlein I wouldn't go that far.
@Vogel612 Getting your naming straight helps.
consider following declaration for Gigaclass:
I'm one of those guys who is not against Hungarian notation but doesn't do it because the rest of the world finds it unacceptable.
I've heard « more natural » in a discussion about programming.
14:46
It took me a long type getting used to auto in C++.
public class Gigaclass
{
    // can't remember property syntax
    Megaclass Megaclass {get; set;}
}
now compare against:
public class Gigaclass
{
    public static class Megaclass
    {
      //stuff here
    }
}
can you say from calling code, which of the two is in there?
in java you can, because you have a getter instead of a property
which makes clear there's a value involved
@Vogel612 I would most likely never do the 2nd.
2
@Mast meh. that's not a valid point
@Vogel612 It's a code smell IMHO.
Totally not generic.
Technically, "no." You cannot tell by looking at a black/white code sample that such is the case.
The nice thing about C# though, is that it doesn't matter which is the case.
14:49
A property has a getter...
And, I have to turn WiFi off again...
Because I cannot do: Gigaclass.Megaclass = new Megaclass(); with the second snippet.
So at that point, the compiler would tell me, "sorry, illegal."
@EBrown That ^^
But, I know squat about C#.
@EBrown you can't know that from reading the code
I wrote it once. But it's very GUI-oriented.
I don't like GUI.
which makes that point invalid, too
14:50
@Vogel612 Sure?
@Vogel612 That depends, what is the code?
7 mins ago, by Mast
@Vogel612 Gigaclass.Megaclass.Superclass.Class.Subclass.Property.get()
If Gigaclass.Megaclass = new Megaclass(); compiles, then I know for a fact that Megaclass inside Gigaclass is one of two things: a property, a field.
but if that's not in the calling code you can see, then you don't know
need more votes on the answers here to show which is the best answer! ▼▼▼
3
Q: Simple Google ReCaptcha validation

MalachiLinked: Google reCAPTCHA Validator: Iteration II I have also created a simple Google Recaptcha Validation class to handle verification. I used some code from CodingFusion's post Google New reCaptcha I am not a robot using asp .net, but I have altered it so that it fit my use case, and to ma...

14:51
@Vogel612 But I don't need to! :P
which makes that If hypothetical
@Malachi Napalmed, but that doesn't help you ^^
@Vogel612 In what case, would it matter to me, if Gigaclass.Megaclass is a property, or a static class?
@Mast lol, I know, they are all really good answers!
when you know that at this place in the code Property is not what you'd expect
and you do not have access to Gigaclass, Megaclass and Superclass source code
anyways we're digressing.
14:54
@Vogel612 Indeed, though it is an interesting conversation.
@EBrown Would Megaclass be an acceptable name for both a field and a property?
0
Q: Web api 2 method insert,update,delete 'softdelete'

NinjaDeveloperI have created C# methods to handle HTTP request insert,update,delete 'softdelete' using Entity Framework (EF) just want to ask how to improve my web api call ? [System.Web.Mvc.HttpPut] [System.Web.Http.Route("api/editItemsForm")] public HttpResponseMessage PutEditItemsForm(ItemManagementViewMod...

0
Q: Not able to delete database value from the url

Roy HuangI was practicing php and tried to create a delete function, however I can successfully grab the values in the database, while I try to process the SQL query, I couldn't delete them. Can someone tell me what are the problems? <?php> if($_SERVER['REQUEST_METHOD']=='POST'){ include('connec...

Or let's rephrase that, wouldn't the name give away whether it's a field or a property?
@CaptainObvious One more VTC, broken.
SVG was surprisingly easy to use in solving that issue I explained earlier
Maybe I'm just getting better at programming
3
Either way
@Mast That depends on what it holds, though you cannot go on name as a basis of actionable type. At some point, the API would have to document what members are available on Megaclass. If it is a property, the API would document that Megaclass is of type Megaclass, and then I would browse to the Megaclass (class) API to see what is in it. If it is a static class inside Gigaclass, then the API would tell me so, and I would then browse to Gigaclass.Megaclass to find my documentation.
14:57
@CaptainObvious this is a bit unclear
@EBrown must be nice to have documentation...
@Quill I VTC'ed as unclear.
@EthanBierlein agreed, also VTC'd
@Quill Easier than PHP? That was the original question IIRC.
@CaptainObvious RBA ....
14:58
@Vogel612 The assembly is self-documenting in that regard. Intellisense can pickup exactly what members are available, and what members are not.
@Mast It was like: I have a problem; is PHP image libraries better than SVG. In which, SVG seemed the general answer
The "API" in this context means "publicly-exposed members."
which isn't helping for undocumented legacy code with a 10k LoC Gigaclass
@EBrown Perhaps I've never programmed that abstract.
@EBrown question: have you been working on Legacy-Systems.. like .. ever?
15:00
everyone stop up voting @Heslacher until I pass him in Reputation, okay? ;)
@Vogel612 All the time. I work with an IBM AS/400, or IBM System i, or IBM iSeries at work. Which is about as legacy as it gets. :P
@Malachi thats a loooong way to go for you ;-)
Then it must be me getting overly cynical and nihilistic again
@EBrown I thought those had died by now.
@Mast Far from it. Ours is still kicking and does so very well. I'm extremely impressed by how well this AS/400 performs.
15:01
@Malachi Upvotes Heslacher
5
@Vogel612 The difference is that you are Java, and I am C#. We have substantially different ways of doing things. In C# we avoid static classes like the plague.
@EBrown Oh well, never change a winning team.
If it ain't broken, don't fix it.
2
@Mast Indeed.
Duct-tape for everything.
Since it will break eventually.
Murphy is a persona non grata.
This AS/400 has one table in it, that is 5.5 million records, each record is generated dynamically from a programme that crawls through every customer in our system (which is about 2500 active customers), and every pricing rule, and every item in our system (another quite-large lot) and creates a record in this table that represents the combination of every customer and item they can purchase and all the price information for that item.
Mind you, some customers cannot purchase some items, so those customer/item combos don't get added.
And this programme runs in less than a minute.
15:05
@EBrown hey it wasn't me
but I've seen things...
Anyone care to help me mortarboard for the day? :)
@EBrown Yea, I wouldn't want to rebuild that.
@Mast It's a pain. I hate querying it, much less when structure changes are made on it. :P
I never queried anything that old.
It supports a basic form of SQL, and IBM updates it periodically to support certain, newer, SQL features.
15:11
It reminds me of the Story of Mel
So this question came from a blog post by Aaron Bertrand, and this comment on that blog post caught my eye. :)
@EBrown Who's Tobi?
@Mast No clue, but they recommended Code Review.
Very peculiar.
TTGTL.
15:29
@EBrown CR is getting popular :-)
when CR site will be out of beta ?
@JoanLeaven we are out of beta, just the blue label needs to be removed
@Vogel612 Nothing has changed yet, right?
Well, we have new moderators.
But afar from that.
So the only indication we're out of beta is because SE says we're out of beta.
yes, correct
So we didn't achieve squat.
15:32
I prodded GraceNote in the anime election room...
in Campaign Café (選挙戦カフェ), yesterday, by Grace Note
Pretty sure that was already arranged and "done" in as far a capacity as we currently can, last month.
in Campaign Café (選挙戦カフェ), yesterday, by Grace Note
Anything else coming or to happen will happen once we can do it for anyone at all.
smells like the graduation mechanism changes are now stopping CR until they are finished...
which is a royal PITA, honestly
@Vogel612 So by trying to speed up the process, they stalled our graduation?
Smells like the devs at SE turned into managers...
I sincerely hope they didn't.
I'm this close to de-installing VS2013 for refusing to commit my commit.
Software has one task: do what it's supposed to do.
Software shouldn't go all smart-ass on the user.
Why is it refusing? ^^
Users can do that perfectly fine themselves...
@skiwi Greyed out buttons which shouldn't be greyed out IMO.
I have an outgoing commit.
But it's not being pushed.
If a pusher won't push, what use does it have...
15:49
@Mast might be getting rejected?
Maybe the actual git commit command fails?
It would be nice if I could get any details on it's status, but no.
The 'details' only show a commit ID, no status, no warning, no failure, no nothing.
0
Q: Linked list C++

MandrukCan someone tell me how I can improve this code??? It works ok, but I feel that I'm using to many pointers #include <iostream> using namespace std; struct link{ int data; link *next; }; class link_list{ private: int boundaries = 0; link *tail; link *temp; link *head = NUL...

0
Q: Heapsort for arbitrary ranges in Java

coderoddeI plan to work on Introsort, which requires a working implementation of heap sort. Also, the heap sort implementation must be able to sort arbitrary ranges within an array, which, in turn, requires some more involved index manipulation. See what I have: Heapsort.java: package net.coderodde.uti...

Scratch IDEs, I'll do it the old-fashioned way...

« first day (830 days earlier)      last day (3486 days later) »