« first day (1024 days earlier)      last day (2984 days later) » 
00:00 - 15:0015:00 - 00:00

12:00 AM
OK.
 
RELOAD! There are 1879 unanswered questions (94.0697% answered)
 
I commit to develop (or whatever branch I set up for the build plan). A Jenkins server builds my app and runs all of the automated tests. If those tests all pass, the binary is pushed out to everyone interested.
Product owners get daily (or more than daily) builds.
 
So, basically like an Appveyor that immediately "releases" changes?
 
yep
 
It doesn't necessarily immediately release to production
Although...
I think Netflix does automated releases to production.
 
12:01 AM
Stack Overflow actually does that, too
 
No, but it does release to anyone who is interested in the changes.
 
remember how the site graduated before it graduated?
 
But you don't have to automate releasing to production to be considered to be using CD.
 
Cool.
 
@MarcGravell, what do you mean live deployment? I thought that StackExchange was filled with professionals that don't need to test their code? — Malachi Jul 15 '14 at 15:16
 
12:03 AM
To be honest, the most important part is that automated tests are automatically run every time you've pushed to develop.
 
Just like Rubberduck and VSDiagnostics.
 
that's usually called continuous integration
notable tools: travis, appveyor, jenkins
 
And then, the second most important part is that product owners get that build as soon as possible so that developers can, as quickly as possible, get feedback on anything that needs to be changed/fix.
 
So, who is considered a product owner?
 
Tools vary significantly depending on the language. Sometimes it includes environment control like Docker
@Hosch250 read up on Scrum
 
12:05 AM
@Hosch250 It depends, but there's normally in a person in a role that's literally called "Product Owner"
 
@Hosch250 the one calling the shots and prioritizing "tickets"
 
OK.
 
also the person you ask when a ticket is unclear
 
What features come in and in what order. How do particular features prioritize versus particular bugs.
 
and it's (for vanilla scrum) exactly one person
 
12:07 AM
Where developers are technical experts for the project, the product owner is the business expert for the project.
 
So, that would be @Mat'sMug for Rubberduck.
 
and then there's the Scrum Master that most people seem to not understand
 
Yeah...
 
@Hosch250 yea, but they usually aren't the Lead Architect simultaneously
PO doesn't meddle in code
 
There's nothing better than an amazing scrum master, and there's nothing worse than anything less than that.
 
12:09 AM
@nhgrif I call a crappy PO is worse than a good scrum master
 
I'd disagree.
 
And a Scrum is where we say what we plan to focus on during the day and what difficulties we think we will encounter, and what we did yesterday.
 
I never actually worked on a "real" Scrum team (whatever that is)
@Hosch250 that's right and wrong at the same time
 
OK, seems people have differing views around the web. What is the right one?
 
Purely from the perspective of a developer, a good PO is great, but scrum masters can be major pains.
 
12:11 AM
@Hosch250 for "the one and only" scrum, check scrumguides.org/scrum-guide.html
 
@Hosch250 You shouldn't waste time in a meeting talking about things that could be determined by looking at a tool like JIRA.
A scrum master has one job. He is the idiot plow.
And if he is an idiot, how can he plow the idiots out of your way?
 
ohhh yea... fun times.
the interesting part here is that this counts for inside the dev-team and outside of it
so if the PO is a moron, the Scrum Master is supposed to keep them in check
 
His whole point of existence is to make sure that things are running as smoothly and efficiently as possible.
 
So, one question I've always had about sprints: What happens when a sprint is completed ahead of time?
Do you just close the sprint early?
 
@Hosch250 pick up stuff from the top of the backlog
And talk about why you finished so early during your retrospective.
 
12:14 AM
What if that stuff would run out of the sprint time frame?
 
@Hosch250 you might consult with the PO
 
What happens when the planned product cannot be finished during the sprint?
 
and ask them what to do
 
Does the sprint end and the next sprint takes up where we left off?
 
@Hosch250 Sprints are timeboxed.
they start and end at predictable dates
 
12:16 AM
I know. But say that a sprint is entirely about Major Feature Xyz. It is planned for a month, but it is not releasable for 6 weeks.
How do you manage things like that?
 
and when you get the work done faster (but nothing else fits in) you can always clean the codebase up
 
To be clear, the point of the sprint being time boxed is that you're also looking at how much your team is able to complete in that time frame. Over enough sprints, you get an idea of how much can be done in a sprint.
 
@Hosch250 At the end of the Sprint, the software is by definition theoretically releasable
 
@Hosch250 Major Feature Xyz should be broken down into smaller components that can be completed within a single sprint.
 
every end of a Sprint is (at the core idea) a possible release date
 
12:17 AM
I mean, what if an unexpected delay happens, like a dev getting hit by a bus?
 
Then the discussion on why you didn't complete what you committed to is pretty easy.
 
then you pick up the pieces, adjust the estimates for the sprint and hire a new dev
 
OK, so the sprint just ends and another one starts without a release.
 
Slow down for a second...
So, I'm actually actively working in a real scrum team...
We base our velocity on story points.
We pulled about 100 story points into our current sprint.
 
@nhgrif I think you're too fast
 
12:19 AM
Just tell me everything. I like stories.
 
If you don't understand story points, ignore it for now. It's just a way of measuring how much work we're completing/committing too
When our sprint ends, there are three outcomes.
1. We completed less than what we committed to.
2. We completed exactly what we committed to.
3. We completed more than what we committed to.
No matter the outcome, we talk about why we had that outcome. We talk about whether that outcome is something we can expect to repeat. Or if we expect better or worse in future sprints.
 
-1
Q: Function divergence and DRY code

bbarringerI am working on writing a module for my portfolio that loads a requested page. The page requested could load either new "content" data or new "content" data AND new grid data. There is still quite a bit I am working on here and some things aren't hooked up yet, but the issue that bothers me curre...

 
We talk about things that are happening that are preventing us from getting more work done. We talk about things that are happening that are helping us get more work done.
And then we plan the next sprint.
 
also... those meetings are usually terse
 
heh
I mean, they're supposed to be.
 
12:23 AM
15 minutes each day, and a 4-hour or less one at the end of each sprint.
So, Scrum teams are usually small?
 
Right now, I'm talking about the one at the end/beginning of sprint
 
@nhgrif so you're doing retro and planning in one go?
@Hosch250 the 4 hours change depending on sprint length
 
@Vogel612 Yeah. Our sprints start/end on Wednesday. We have a demo, retro, planning on Wednesday afternoons.
 
Before you start, you decide on a sprint length. usually between 2 and 4 weeks
 
planning is the worst...
We watch the scrum master fill out his stupid spreadsheet...
 
12:25 AM
oh... so you don't have an amazing scrum master :/
 
No.
There's also a meeting in here which we haven't mentioned: backlog grooming
Which is the only meeting out of all of these that I actually like.
 
@nhgrif that's not vanilla, is it?
 
I believe it is.
 
or did that change since I got my certification?
 
...certification?
Backlog grooming is when you work your way through the backlog and assign story points to the stories in the backlog.
 
12:28 AM
@nhgrif seems it's not vanilla
@nhgrif I have a "Professional Scrum Master"-Certificate
 
What is "sprint review" and how does that compare to retro?
 
Monking @Snowhawk04 btw
 
sup
 
@nhgrif review seems to be the demo meeting
it can include externals (like major stakeholders)
 
oh, makes sense
 
12:29 AM
retro is internal only
 
Yeah
so, how does the backlog get groomed then?
Actually
probably what's going on is that our planning meeting is a pile of idiocy
 
lol
 
> The Scrum Team decides how and when refinement is done.
 
And what we do during backlog is closer to what should be done during our planning meetings
 
@nhgrif theoretically the PO should do the ordering and breaking down.
Estimation happens in planning
 
12:30 AM
uh
Why is PO estimating how long development work takes?
 
he isn't
 
oh, I misread
 
PO decides what deliverables they want in next iteration, besically.
 
off topic... but I just read this on The Workplace:
> For example, we learned that he was upset because "if he had known that we weren't reimbursing his transportation to the airport, he would have taken a cheaper mode of transport."
heh, never hire that guy, whoever he is
 
Supper time. BBL.
Thanks for the info.
 
12:36 AM
I think that the employee in question might be right in the big picture... but it's kind of Scumbag Steve to base your decisions on whether or not the company is paying for that decision.
And perhaps doubly so to make the assumption that the company is paying without knowing it for sure.
 
12:48 AM
One more answer to go for that bronze badge.
0
A: Generate all permutations in C

nhgrifThis code is far from readable. Optional braces should not be considered optional. Omitting these braces leaves your code prone to future errors. Besides this, I personally find it makes your code harder to parse. I'm so used to seeing loop bodies (or if/else) contained within braces, tha...

God, I'm so glad braces are non-optional in Swift.
 
1:35 AM
This looks to be opinion based without a "correct" answer, or best decision made on a case by case basis (my opinion). @ariberiro supplied link to codereview has more discussion — Traktor53 7 secs ago
 
1:56 AM
Working code should be placed on codereview.stackexchange.comcricket_007 8 secs ago
@cricket_007 It is possible that this particular question might be a fit for Code Review, the conjecture that all working code should automatically go to Code Review is less than accurate. — nhgrif 9 secs ago
 
2:19 AM
@AyleanClaraGrandieur - I believe you have a legitimate question, but as it is written it is not appropriate for Stack Overflow. As previously suggested I think the Code Review site might be a better option. Alternatively, you can restructure the question to be more specific. For example, if you want to use assembly, SSE instructions, threading, etc, to improve performance, you should ask a more targeted questions. — JBCP 49 secs ago
 
0
Q: Queue implementation using an array

LoganWe have a Queue implemented using an array of size 5, front and back start at index 0 and we do the following: enQueue(1); enQueue(2); enQueue(3); deQueue(); enQueue( deQueue() ); enQueue(4); What are the indexes of front and back? I said the front was at index 2 and the back was at index...

 
3:15 AM
possible answer invalidation by Peter Mortensen on question by imoteb: codereview.stackexchange.com/posts/120714/revisions
 
3:39 AM
-2
Q: i need help to solve this

twizzyweezyWrite a C program to get the age (three integer numbers) from the input. The format of age is dd-mm-yyyy. The program calculates the number of days of age before 01/01/2016 (until 30/12/2015) and display the result. Ask the user to repeat by pressing ‘y’ or stop by pressing ‘n’. You have to cons...

 
 
1 hour later…
5:03 AM
Reposted on Code Review. — Jack Galt 57 secs ago
 
0
Q: Potential Pitfalls with this numeric integrity check

Jack GaltI'm a Beginning C programmer. I need a function that will take a string and determine if it's a number. The data is coming from files created by different people and the number formats WILL vary. So the function needs to decide if it was Supposed to be a number and if so, I will call the right co...

 
5:21 AM
@ZephyrMays feel free to post your working code (with as much context as possible) on Code Review for help making it more readable, efficient, maintainable, etc. — Mat's Mug 54 secs ago
 
0
Q: Reusing curl easy handles in C

user3275095In a C project I want to reuse curl easy handles. The flow of program is like: Client --> C Application --> Call URL1, do something, Call URL2, do something, Call URL3... In short, for each client request, same set of URLs are called. I initially create the curl easy handle when the program st...

 
5:52 AM
Apart from the fact that fetch is asynchronous, I don't see much issues with your code. But your question is not a real question. For code review, suggestions etc, try this place codereview.stackexchange.comT J 12 secs ago
 
6:03 AM
0
Q: Breaking bills into different denominations

mlopmanThis is a BillBreaker Java program that breaks a number entered into the different denominations such as: hundreds, fifties, twenties, tens, fives, twos, ones, quarters, etc. The program seems to work fine for many of the test inputs, but there are a few times where the final output is off by on...

 
Ask code review related questions on codereview.stackexchange.com . — Sandeep Biradar 24 secs ago
CodeReview might be a better home for this question. — Teemu 15 secs ago
 
0
Q: Which way is better to iterate arraylist in java?

Dharmesh DhameliyaHere is my code Which code statements is going to better performance code 1 or code 2 ArrayList<String> datalist = new ArrayList<String>(); // Code 1 int size = datalist.size(); for(int i=0;i<size;i++){ } // Code 2 for(int i=0;i<datalist.size();i++){ }

 
6:19 AM
monking @all
 
6:37 AM
0
Q: Can this Code improved ?Sql inhection

vignesh wararI am totally new to php..Can this code improved By using addslashed function to prevent second order sql injection if (isset($_POST['submit'])) { $content = strip_tags($_POST['cont'],'<h1>,<br>,<h2>,<h3>,<h4>,<strong>,<a>'); $content_date = date('d-m-y'); if (!empty($con...

 
possible answer invalidation by Kenny Ferrante on question by Kenny Ferrante: codereview.stackexchange.com/posts/120581/revisions
 
0
Q: Comparing two integers without logical, relational or bitwise operators --- followup

sun qingyaoRequirement: Compare the input numbers (granted to be non-negative) without logical, relational or bitwise operators, and insert the corresponding comparison sign between them. Previous question: Comparing two integers without logical, relational or bitwise operators. Answer link on Stack Over...

0
Q: Bills Dispenser machine

dissidiaI have just started out learning C++ and I am trying to write out a simple bills' dispenser machine, chanced upon my brother's notes and thought I had give it a go.. The question is : Upon user-input, the system is to check if it can pays out the amount but only in 20 and 50 bills, and it shoul...

 
7:12 AM
0
Q: deeply nested json

ken$scope.myData={ "market" :[{ "mid":3 , "mname":"mark1", "submarket":[ { "id":20,"name":"val1" }, { "id":24,"name":"val2", "submarket":[ {"id":26,"name":"val21"} ] } ] "market":[{ "mid":4,"name":"mark1.1", "submarket":[ {.... ...

 
Simple example: fork(). If you look at the manpage, there are three different groups of values it returns, but you only make a distinction between two of them. If fork() fails, I'd just throw std::runtime_error("fork() failed") as default error handling concept, so the fault doesn't go unnoticed. This also applies to other functions here, just read the according documentation to find out how they signal errors. You can also post your code for review on codereview.stackexchange.com to get further suggestions. — Ulrich Eckhardt 57 secs ago
 
Date-time manipulation sucks
 
moment.js
 
I am using moment.js
The issue is that this stupid date picker is being stupid and giving me stupid dates in stupid American format when I'm telling it not to. Because it's stupid.
And everything else is expecting dd/MM/yyyy
 
> American format
that's the problem here
 
7:23 AM
sorry, I meant Freedom format.
 
LOL
 
Have I mentioned it's stupid? It's stupid.
The worst thing is when it is easier to disable validation than to enforce it
 
Have fun
Is object lookup by key O(1) or O(N)?
 
7:50 AM
Depends on the data structure @Quill
 
JavaScript
 
uh
I think it's O(1) for arrays
And it might very well be O(1) for objects too
34
Q: Array vs. Object efficiency in JavaScript

Moshe ShahamI have a model with possibly thousands of objects. I was wondering what would be the most efficient way of storing them and retrieving a single object once I have it's id. The id's are long numbers. So these are the 2 options I was thinking about. in option one it's a simple array with an increm...

relevant jsperf:
theoretically speaking they're a hash so it should be O(1). But it's browser dependant
 
I have different usecases for the same data, and I'm not 100% on which to choose
 
Just pick one.
Premature optimisation $\sqrt{all evil}$
It's unlikely to be a bottleneck.
Remember that arrays are just a form of "exotic Object" in the js specification. The only difference from "real" objects is that their keys are implicitly converted to strings int he underlying object representation.
That is to say, array[0] should be equivalent to object["0"]
 
I just don't want to have to iterate over elements to find the one I want, but I also want to get the first one
 
8:03 AM
@Quill If you want the first one, get a FIFO.
 
domain.rooms[Object.keys(domain.rooms)[0]]
 
Sounds like you want a Map (ES6)
 
How so?
 
because you want random access
oh, wait, nvm
I misunderstood your code
wait. that's confusing
is your data structure { [key]: [key] }?
 
wat
Some context might be good
 
8:07 AM
yes please
 
I'm storing data of the chatrooms this script will connect to
I want to be able to lookup the rooms based on keys (room ids)
so it goes:
{'room_domains': [
    {name:'', rooms: [
        {'room_id': 32, name: ''},
        ...
    ]}
]}
 
i don't think it's a good idea to have the array index of an element stored in that element
unless you are treating it like a DB table
 
8:32 AM
I changed it before, but then I wanted a default room, which would effectively default to be the first element
but firsts in Object context is a bit weird
 
not sure what to suggest
sorry slow replies, implementing features
remembering to maintain my posture is hard enough let alone replying in a chat room x)
 
@Quill That's interesting, bookmarked
 
This photo of our new overlord marching amongst his plugged in subjects is really something https://t.co/VP3iB6rfws
Mass VR conference. wow
 
8:52 AM
I, for one, welcome our new goggled overlords.
 
> npm ERR! 404 'bebel' is not in the npm registry.
 
bebel, lol
 
my babel install will never work
 
it's babel, not bebel
 
yeah, spelling it rihgt is helpful
 
8:53 AM
I refuse to believe that wasn't intentional
 
It wasn't intentional, and then I fixed it, and then it was
 
0
Q: Is this a right way of peristent login[remember me] cookie php?

bɪˈɡɪnəThe code below is a attempt to create a persistent login cookie. I am a amateur and not professional so this is the first attempt to have secure remember me cookie. Now I want you guys to review two things: I am trying to create a system like best way to implement remember me but I am not sure ...

 
possible answer invalidation by dissidia on question by dissidia: codereview.stackexchange.com/posts/120764/revisions
 
@Duga rolled back
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Check if a game of Tic-Tac-Toe has a winner
 
Zak
9:09 AM
I swear my macros are sentient. They break when I'm not in the office, and are magically working again as soon as I return.
4
 
I am pretty sure my boss emits his own magnetic field
Because every time he comes to observe one of my features it magically breaks
2
and works for everyone else except him
 
possible answer invalidation by user35 on question by user35: codereview.stackexchange.com/posts/120609/revisions
 
@Duga should not have received an answer anyway, it's broken, I guess this fixes it?
 
Zak
9:40 AM
@DanPantry So your boss is the living embodiment of Finagle's Law?
 
He's more like a walking gauss coil.
2
 
9:52 AM
I'm mad......
Just looked at a history item in a grid
That stored a string - such as an event, plus the cost, for example.
It's not autogenrated. That string is stored in the database. The cost isn't stored in the databse.
So you have a line like "Sold to customer - £6000" which is genreated by selected options, but that string itself is stored in the DB - not the 6000, £ and activity code individually.
So there's no way to datamine it.
Or translate it.
Grrrrrrrrrrr
 
10:11 AM
wat
expect.js has an interesting syntax
expect(window.r).to.be(undefined);
expect({ a: 'b' }).to.eql({ a: 'b' })
expect(5).to.be.a('number');
expect([]).to.be.an('array');
expect(window).not.to.be.an(Image);
 
hey
 
hey there @skiwi
 
10:26 AM
@Quill That's a lot like Chai's
I can't believe I'm having to explain to someone how to use a damn bug/issue tracker... just log out the information of what you want changed. Don't put in a vague title and then expect me to know what it means.
 
It's a shame I can't buy i.cloud
 
i.australia
@Quill if .ud is a domain you could try i.clo.ud
 
I'm looking up .cloud tlds atm
so expensive
 
I guess you could say the price is.. sky-high
3
*sunglasses*
yeaaaaaaaaaaaaaaaaaaaaaaah
 
 
10:34 AM
Sounds reasonable ^^
 
You wouldn't download a cloud...
 
inthe.cloud is $28,999.99
 
I remember the good old days when naming a cloud was as simple as pointing at it and saying it looks like an Elephant.
 
I should get mypicsareoni.cloud
 
Update: DURATION column in SQL is actually the sale amount.
3
There's no currency info stored, you have to determine it based on the country that bought it.
Database schema
 
10:37 AM
@DanPantry wat
 
I don't know who designed this. I'm not gonna say Aliens, but..
 
Silly brits Aliens
 
@skiwi oh it's only sale amount if the TYPE column is SLE. Otherwise it's actually the duration.
 
Look's like I did a good job at the contest ;)
3
 
@chillworld Wait, did you come first?
 
10:38 AM
And I feel bad sometimes when I make a small hack...
 
@DanPantry jip ;)
 
@chillworld Congrats :D
 
0
Q: Excel VBA - forecast maintenance interval for fleet of aircraft

Zephyr MaysBLUF: being new to VBA, and many years removed from college programming courses in Java, I'm seeking opinions about design, implementation, readability and general better practices using VBA to tackle complex problems. There are probably other programming languages much better suited to this pro...

 
first in jury and thirth in voting
thx, mine wife will be happy with the apple watch :D
 
They're really cool
 
10:41 AM
@chillworld So what did you win? ;)
 
@skiwi that's easy, when the watch arrived I have a sweet evening ;)
2
 
I could say eternal gratitude of mine wife, but she forget that the next morning already
 
I hope she doesn't read this chat then ;)
 
Small battles lead to greater success
 
10:52 AM
@skiwi nah, on visit by her sister ^^
 
0
Q: Domain Model for Simple Yes/No

Callum LiningtonWorking from a C# and EntityFramework background. Jimmy Bogard makes the point of modelling your domain model correctly, such that an Email Address is not a simple string but should be of type EmailAddress. Also known as Primitive Obsession. I've come to this part of a piece of software where a...

 
11:05 AM
. @mats-mug - as suggested, I posted my project, after major clean up, over at Code Review - here. Thanks again for the suggestions. Getting back to basics with those statements has made all the difference in remembering what I was trying to do and why! — Zephyr Mays 1 min ago
 
 
1 hour later…
12:12 PM
@DanPantry That's... unusual, to say the least
 
12:37 PM
Remember kids
Copy-pasted code is bad.
 
@DanPantry of course, your missing the important steps:
Copy => paste => SO question => copy answer => paste answer => CR question => copy answer => paste answer => good code ^^
2
 
Had two functions - only one parameter apart (same name) doing the same thing
but one of the functions was replacing \r\n with <br />, the other one wasn't
and that replace was all on one line with other stuff so it was hard to spot
 
mhh and they had the same name ^^
 
yep, same name, one had an extra string parameter
Turns out method A was doing at least two different things to method B
 
This phantomjs stuff is seriously messing with my head
 
12:44 PM
the problem there was just naming. cause you should go out if same name the one with 1 param less calls the other method with an extra "null" or default value
 
@chillworld Not naming, the two things method A is doing should be done in method B too, I'm not sure why there are even two methods.
wait nvm, that's what you just said :D
@Quill What's confusing about it?
 
It wouldn't install because it's requirements wouldn't install
so I had to install a bunch of other stuff, uninstall a bunch more
and my terminal log is the size of the bible right now
and finally, I have a CORS issue that was supposed to be fixed 7 months ago that's flaring up
 
@Quill they should definitely come here with there code ;)
 
@Quill phantomjs-prebuilt, right?
@Quill Access-Control-Allow-Origin: '*'
 
I'm going to stop the work day, got to get the kids from school
 
12:58 PM
There's supposed to be an options file, but I can't find it
 
TTGTB
 
1:21 PM
Greetings, Programs.
 
0
Q: colorful output on terminal

Abhinav GauniyalStraight to the code #ifndef RANG_H #define RANG_H #include <iostream> #include <cstdlib> #include <cstring> extern "C" { #include <unistd.h> } namespace rang { enum class style : unsigned char { Reset = 0, bold = 1, dim = 2, italic = 3, ...

 
This should make for my bronze badge.
0
A: Numeric integrity check

nhgrifAs far as the C programming language goes, check_is_numeric is a quite good function name. I could spend some time talking about a few variable names through your code that could stand to be a little bit better (as people around here know, I'm a stickler for writing readable code). But we can a...

 
I'm thinking about posting this on main.
But feels too long and think I'll only get formatting advice.
 
dear god...
 
what is so dear about it?
 
1:32 PM
I could write an entire program in that white space.
 
guess I can change r# settings to indent four spaces
or one row but not important imo
small class doing only ~one thing
 
IsImmutable is really long.
ShouldCheckPropertyOrField isn't thread safe.
 
yeah, could split up the field & property checks
@nhgrif how is it not?
 
        if (checkedTypes == null)
        {
            checkedTypes = new List<Type>(1) { type };
        }
 
checkedTypes are passed in
not state
 
1:35 PM
Thread 1 checks the if, finds `null`, enters `if` body.
Thread 2 checks the if, finds `null`, enters `if` body.
Thread 1 assigns value to `checkedTypes`.
Thread 2 overwrites and reassigns to `checkedTypes`.
 
I control the threads
 
So there's one way. But also, because checkedTypes is a List and not a Set, you could end up with the same value in there multiple times in a race condition.
Neither of these should generate bugs, but both of them will cause some lack of efficiency.
 
I used list cos cheaper allocation
 
0
Q: Closing sql connection for async operations

A. K-RThe following code executes asynchron on the sql database. Is the closing of the connection implemented in the right way? Are there any missing features regarding connection handling which need to be added? public void deleteData(Node node, User user) { SqlConnection connecti...

 
@JohanLarsson You're not controlling the threads in the code you posted. And thusly, the statement, ShouldCheckPropertyOrField is not thread safe.
 
1:38 PM
expecting the list to be short and list to perform better than a set
@nhgrif private static bool IsImmutable(Type type, List<Type> checkedTypes)
 
That's fine, but the lack of thread safety means the same thing could make it in the list twice, and that makes the list bigger than it needs to be (effecting performance negatively)
 
private means I control the threads
 
No it doesn't.
 
as written it does
 
Unless you're controlling them in the exposed method that calls the private methods.
(which you are not)
 
Because @JohanLarsson where that call is made could be on ANY thread.
You don't know what thread I've called internal static bool IsImmutable(this Type type) on.
 
yes, but that thread creates the list and I start no other threads
 
could be main, could be background, could be 30 threads at the same time.
@JohanLarsson You don't. You don't prevent me from calling that method on multiple threads at once.
 
worst case is you call it on ten threads and the whole recursive thing is ran in paralel
before the caches are updated
better than locking imo
 
I didn't see recursion. But if you are okay with in not being thread safe, that's a decision you make. But if it's not thread safe ( it's not), don't claim that it is
 
1:45 PM
I have to ask you for a proof that it is not thread safe
if you call it on ten threads ten different lists will be created
one per thread
Thanks for the questions of course.
 
you won't get one list per every thread
can't even guarantee that you will get more than one list, but it's possible.
 
0
Q: Force attribute value on potentially non-existent or locked PyNode

d3vidI am working in Maya using PyMEL. [1] I need to set an attribute value on an arbitrary node. The attribute may not exist or, if it does exist, may be locked. I found that setAttr with force=True did not account for all these scenarios, so I made my own... import pymel.core as core def _maya_for...

 
Monking
 
2:10 PM
IMO, this question is better suited for Code Review. — John White 30 secs ago
I'm voting to close this question as off-topic because it is a request for a code review. — Raedwald 6 secs ago
@Raedwald "Belongs on Code Review" or "is a code review request" is not a valid close reason. Please see the section "What you should not do" in A Guide to Code Review for Stack Overflow UsersEthan Bierlein just now
 
0
Q: Searching Subdirectories of a Subdirectory for Registry Keys to Delete

BassiePlease let me know if I can improve my question in any way I build/maintain an IT Support Self-Help App and recently had the need to include some registry key manipulation when users experience certain issues. I create the Reggie class to handle the general registry key manipulation: using S...

 
Code reviews are off topic here. Whether a particular request for a code review is on topic somewhere else is a different matter. — Raedwald 16 secs ago
 
@nhgrif yes, it is static
 
@Raedwald Regardless of whether code reviews are off-topic or not, "is a code review" is still not a valid close reason. — Ethan Bierlein 29 secs ago
 
can be simplified to:
internal static void Foo()
{
    var checkedTypes = new List<Type>();
    ...
}
 
2:24 PM
@Raedwald Depends how you define "Code Review". Stack Overflow is for specific programming questions, so whilst a general Code Review is probably too broad, a focused review of a properly scoped aspect of some piece of code certainly can be. — Zak 58 secs ago
possible answer invalidation by user3624251 on question by user3624251: codereview.stackexchange.com/posts/120160/revisions
 
2:53 PM
0
Q: MVC API controller processing POST request

KaiDo I need to restructure for readability? public HttpResponseMessage Post([FromBody]BoatProperties props) { // model validation if(ModelState.IsValid) { // check if guid is set, else set it; don't set when user is admin if(props.Guid == null &&...

 
00:00 - 15:0015:00 - 00:00

« first day (1024 days earlier)      last day (2984 days later) »