« first day (475 days earlier)      last day (3533 days later) » 

12:00 AM
ish. I need sleep.
 
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
I forget who came up with that quote, though
 
The other part is "Failure to do that might result in that guy turning into a violent psychopath that will google your name and see what comes up"
 
not a problem for me
Dan Lyons is an editor of Forbes magazine
 
@DanLyons I maintain my own code, so this is already true :(
 
3
Q: Overuse of var-keyword

MarkI see a lot of C#-questions recently that make use of the var keyword. For those not familiar with C#/var (I don't know if other languages have similar features): You declare something var and the compiler (and IDE usually already as well) guesses the type you want and watches over that, so the...

Hah. Glad to see C++ isn't the only language for which the community is split on type deduction.
 
12:11 AM
Dr.Skeet how I learned to stop worrying and love the var
 
Wait, there are disputes over the use of auto? I thought it was widely-accepted.
 
I don't like it @Corbin. I'll take the few seconds to change it if I have to.
 
@Jamal Sutter and Meyers both agree on "almost always auto." Large parts of the community is less excited.
Personally I fall into the "auto when it makes sense" camp :/
 
Come on SO... Give me something to downvote...
 
Well, I personally wouldn't use it with glee, and instead use it where it could benefit.
 
12:15 AM
There's a lot of situations where auto can be incredibly confusing, but there's also situations where you truly do not care about type. It's basically just duck typing, which to strong typing people can be scary :p
 
@RubberDuck Are you sure you're on SO?
 
It's type inference rather than duck typing
 
Yeah, it's not truly duck typing
just has the same feel
"i dont care what the type is, i just want it to have this method"
but of course it's not real duck typing since it's still strongly typed
and true duck typing requires dynamic typing
 
I would imagine fans of strong, static type systems would love type inference, since it comes from functional languages, where your type systems are about as strong and as static as you can get.
 
New things scare people :p
 
12:17 AM
Yes @Jamal. I found something. I feel better.
 
I think it really just comes down to the same problem that happens with every new feature to a language -- people way overuse it at first.
Once everyone has calmed down and started to use auto in reasonable situations, it will get the love it deserves.
Until then it will have people screaming "omg it makes things confusing!" because it can. Not because it always does.
 
> I have a new hammer. Everything's a nail.
 
Yeah, pretty much
 
@RubberDuck I was kidding. :P I thought one could easily find something downvote-worthy on SO.
 
And unfortunately the hammer gets blamed, not the person hammering.
 
12:19 AM
So did I! It took a few minutes.
 
And wow I just got super side tracked from type inference in functional languages -> way overuse and then emphatic hatred of new features
 
I'm just not a big fan of it @Corbin. I like to see right where a variable is declared what type if is.
I'm lazy. I want to think about what it's doing not what it is.
 
Um. What is "duck typing"?
 
Eh, I think it comes down to something fairly personal at the end of the day. In certain situations, I don't care whether I have an std::vector<int>::const_iterator, a const int*, or a something::else<int>::iterator. I just want it to be able to expect it to have operators ==, ++ and *.
 
In computer programming with object-oriented programming languages, duck typing is a style of typing in which an object's methods and properties determine the valid semantics, rather than its inheritance from a particular class or implementation of an explicit interface. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see history below), which may be phrased as follows: When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck. In duck typing, a programmer is only concerned with ensuring that objects behave...
 
12:21 AM
pictures a duck dancing on a keyboard
3
 
there is of course danger though in that if the things you're getting the value from is insanely named
then you're about to be very confused
There's tons of times you use similar concepts and no one complains about it. I mean, the entire templating system uses type inference just turned on its head. (Although this might be where you begin to argue for concepts... :p)
 
@Phrancis Quack!
3
 
In short: it's a tool seen primarily in dynamic languages where you have method Bar which calls method Foo on a passed object, and Bar allows arguments of any type which happen to have a Foo method on them.
 
@Phrancis LOL , (I actually laughed out loud,glad no one is in the room)
 
12:27 AM
Yeah the Wikipedia examples made sense
This doesn't sound like something desirable, to me...?
 
AFLAC
 
But yeah, doesn't apply to databases so I don't really know what I'm talking about
 
It depends on whether you prefer static versus dynamic type systems.
 
Can someone think of a simple example where duck typing/dynamic would be a better application? Just trying to frame it... I've seen dynamic SQL but that's about the extent of it
Definitely nothing OO
 
When you need code that is very generic, duck typing is awesome for making the code super compact
 
12:33 AM
Something like a search engine perhaps?
 
Imagine you have a collection of some kind and you want to do something with each element. Instead of taking an array and making sure it has an each method, you can just take anything and as long as it has an each method, the code will run perfectly fine. So now it can work with an array, a list, a collection, a set, etc.
 
That makes sense
 
It would be incredibly strange to have a dynamic type system and not have at least optional duck typing. It's kind of a side effect of dynamic typing.
(it's not a side effect as in cause/effect, just in the sense of the logical next step)
 
You're good at explaining things @Corbin
 
12:35 AM
:D
 
The risk is that you're basing behavior on method names and arguments, while lacking context. Calling a Roll() method which returns an int shouldn't work the same on both a Die class and a Wheel class.
 
if you've ever used a statically typed language with static polymorphism (think C++ templates, Java generics, etc), it's basically the same thing just at run time (meaning instead of a compilation error, you get a "oh shit! that method doesn't exist! time to bail!" run time error).
 
I haven't used any of that but it makes sense... lol
I've been told SQL is not real programming and I'm starting to understand why :)
 
0
Q: Hints for a DRY solution for this code

rhgrant10I'm attempting to provide an agnostic means of identifying a member. I need a nickname, a guid, and one of user_id, email, or phone_number. Since I'm using python, I try to not care about the python type of member because, after all, if it has what I'm looking for then I don't really care whether...

 
12:52 AM
I don't understand the downvote on this question:
1
Q: Does this count as example code?

nhgrifA c# question was just posted: Set desktop background. One of the lines in the posted code looks like this: string json = webClient.DownloadString("super secret website url"); Clearly, in the actual source code, this is a URL and not an example string. Does this count as example/filler/stu...

 
SQL is just a different kind of programming IMO. one where if you're doing it right, you're not programming.
 
What are you doing then, if you're doing it right? Codemonking? ;)
 
Downvoting a meta question essentially suggests "This shouldn't have been asked on the meta." I don't understand why someone would think that about my meta question.
 
Me neither. I try to get over negative feedback pretty quickly. If I can fix it, I will. If not, tough cookies
 
Not writing cursors @Phrancis. =)
 
12:57 AM
LOL.
 
It's hardly feedback really.
When I get downvotes, I want to know why so I can correct it.
 
Sure. But it's the internet and it's full of zombies trolls
 
Like, why does this question have a downvote (with no comment)?
4
Q: API for SQLConnect Library

nhgrifI've designed a library for connecting Objective-C (and now Swift) apps to Microsoft SQL Server 2005+. (I believe there are other databases it works with, but I've only tested with MSSQL.) The project is available on Github here, and while users are fully capable of downloading the uncompiled p...

 
No idea. It's a good (grey area) question, that aspect (grey area) may have confused someone who has not been in chat to follow the discussion
I feel if it was something big though they would VTC. A downvote seems very arbitrary and I tend to disregard them
 
But the thing about grey area questions is that the debate is about whether or not to close them.
 
1:00 AM
Unless they come with a comment or VTC
 
If you've missed out of the debate, then you wouldn't know we're holding off on closing them, so you'd cast a close vote.
 
I agree. Someone who hasn't been on Meta or in here wouldn't know that though
And new users can't VTC until a certain rep is achieved, so DV is the best they can do
Perhaps if one VTC was present it would sway things... I remember being a new user not that long ago and I certainly did not want to rock the boat when I had like 100 rep
 
Or it's a user who knows we're holding off on closing grey area questions and cast a downvote instead.
 
That's certainly possible
 
If if they know we're holding off, then they know there is a discussion.
 
1:04 AM
And?
 
Most of the point of me posting that question was actually to have a good question for the discussion.
I've looked in the chatroom opened for the debate and across the meta, there's no comment anywhere on that post.
Casting a downvote just seems random and completely unhelpful to anyone.
 
I think the most important metric is what kind of answer will come out of it... that's kind of why I suggested to also post on Programmers
 
It doesn't actually contribute to the discussion of whether or not these sorts of questions are on-topic.
 
And compare
 
That's fine if that's the metric, Phrancis, but what I'm saying is that casting an anonymous downvote doesn't help us figured out what to do with these sorts of questions.
 
1:06 AM
Much agreed
 
The downvote is fine, but if you want to contribute to the discussion, downvote, then post to the meta with a link to my question and explain why you think this sort of question is not a good fit for CodeReview.
 
Doesn't it?
 
No.
 
The core idea of SE is the voting system.
 
You should downvote bad questions. you should vote to close off-topic questions.
 
1:08 AM
I think a comment on the question would have been common courtesy, at the very least
 
I downvote on-topic questions all day.
The voting system is a sign of the quality, not whether or not it's on topic.
And since we're trying to figure out if these sorts of questions are a good fit for Code Review, we need feedback beyond just up and down votes.
Actually, it's not even just the downvotes.
 
You should downvote and VTC off topic questions. Off topic is poor quality.
 
It's the upvotes to.
The upvotes aren't particularly helpful either.
Someone who has upvoted my question who thinks it's a good fit for CodeReview should post in the meta about it.
I certainly don't upvote questions that are off-topic. Sometimes I refrain from downvoting if it's from a new user and is a good question but on the wrong site.
 
And if it was someone who has not visited Meta? What then? You're over reacting.
 
I upvoted to help put it out there, though my opinion from the beginning has been that it should be on Programmers. Would you like for me to retract @nhgrif ?
They have people there that respond to questions like these regularly, and no controversy involved... I think the best CR can do on design type code is comment on formatting and naming... beyond that... eh...?
 
1:13 AM
If you think it should be on programmers, then you should post on the meta and say that.
I'm not overreacting.
 
OK. @nhgrif would you mind posting a link to your question on Meta? Or should I start a new one?
 
Yeah.... You are. You're all bent over a couple of downvotes.
 
I'm not bent over downvotes.
I'm annoyed that there's no feedback.
A downvote isn't really feedback.
 
I agree ^
 
It'd be fine if there was already at least one comment where someone explained why a downvote might happen.
And then there were 3 downvotes.
I'm fine if there are more downvotes than comments explaining downvotes. It bothers me when there are downvotes and not a single comment explaining what's wrong with the question.
 
1:16 AM
Voters are under no obligation to explain themselves and you're acting like a spoiled child.
 
Take a deep breath guys, please
 
I'm matter-of-fact-ly stating that it annoys me.
I'm sorry that my opinions on the meta annoy you and you've decided that means you don't like me at all.
 
Wow. Ok. Yeah. No.
I often agree with you @nhgrif.
It's your approach to things that I don't care for.
 
Such as?
I'm 100% about feedback.
 
1:21 AM
You tend to be aggravated and over the top. Demanding. Close minded. Those are traits that I personally have a hard time coping with.
 
Can you give some examples from which you've gotten that impression?
 
It's your way or no way.
No.
 
...
 
@Phrancis: You can ping a mod here if you believe a message should be deleted (which is still at their discretion). Flagging can just attract other moderators.
 
I'm not going to give you references.
 
1:21 AM
And please keep it civil here (the rest of you).
 
You realize that it's hard to really discern someone's tone and such over text, right?
 
Thanks @Jamal
 
Oh Oh Oh .... is it popcorn time?
What am I missing?
@Malachi ..... you know what time it is?
 
I can tell by your comment that you don't even like that I asked this question: meta.codereview.stackexchange.com/questions/2349/…
But what's wrong with asking the question? Before I even posted it, I was kind of leaning toward 200_success's answer.
 
1:23 AM
Sorry I didn't realize flagging notified mods outside CR. I just felt things were getting a little bit off-topic for CR chat
 
I made no hint (or tried not to) in the question that I thought it WAS example code and needed to be closed, but I thought it was appropriate to have the discussion at least.
Ultimately, what I want isn't my way. I want things to be logical and consistent. When things aren't, I will hammer at them until they are logical and consistent.
In that way, I can agree that I can be demanding, and perhaps I can be close-minded about things being logical and consistent.
But the whole point of the meta is for us to have a place to hammer out what is and isn't on-topic, how we should handle things as a community. It wouldn't really work if everyone just upvoted the first meta answer posted to every question and no one ever disagreed.
 
0
Q: Improving design for a CustomerDAO with DatabaseManager object

TazManI'm learning about SRP and had to reduce the responsibility of a customer object which contained too much info. So I turned that into just a pojo and pulled out database logic. I'm trying to find the best design fort this setup and am split between making the DatabaseManager class be a parent cl...

 
@nhgrif personally, I like that you pick up on these kinds of things, with the caveat that I think it may be wise to have a bit of a "buffer" and a random one-off be written as that, it's the internet and random stuff happens; but when a trend is present, or even a few unrelated instances, it should be discussed. And I think you've been more than thorough and willing to play out scenarios and that's awesome
 
Moreover, the more that is discussed on the meta, particularly when a good dissenting opinion is presented, the easier it is for us to direct newer members to the community to that discussion that already occurred if they have questions about how we do things. All of the good counter-arguments have already been presented.
 
^ stargreed
 
1:30 AM
Alright..... 1 beer, and 5 minutes to catch up on the gist of the discussin here.
 
@nhgrif I'm not going to argue with you anymore tonight. If you would like to talk later (tomorrow) we can set up a private chat.
 
Not sure whether I should grab another, or get involved.
 
^ grab another
(then maybe get involved)
 
Both?? Lol
 
You need a banana.
2
 
1:32 AM
@nhgrif - just an observation (one for you in a moment, @Phrancis).
These meta questions are all good, and beneficial.
I have no issue with them.... but, votes on SE, and Meta in particular, have no .... impact in your real life.
remember, it's all about internet points, which are not real..... and, if you are having fun, that's great. But, if things happen that irritate you, then just ignore them.
We have 40K users, you can't like all of them, and they won't all like you.
 
I know that...
 
and certainly, even if they all like you, you won't all agree.
good, then there's no real reason to get upset about votes.
and on meta, a vote just means that someone may disagree.
 
I'm not upset.
 
OK, good, I probably missed something.
 
But what's to disagree with in this question? meta.codereview.stackexchange.com/questions/2349/…
I'm not taking a side.
 
1:36 AM
@nhgrif why do you care?
 
About?
 
> But what's to disagree with in this question? meta.codereview.stackexchange…
 
About what there is to disagree with in the question?
 
What I am saying is that you are already a significant contributor on main site, and becoming prolific on meta too. These things will happen.
and will happen a lot more as you ask more.
And @Phrancis - flags in chat get seen by all moderators of all sites except Stack Overflow, and then probably also by all users of chat with more than 10K rep.
 
That's good to know, had no idea
 
1:41 AM
If you flag for moderator, then only all moderators on stack exchange get notified ;-) ?
not just code review.
flags are for serious issues only.
 
Duly noted sir :)
Enjoy your beer @rolfl
 
@RubberDuck we got the same number of DV :D
ckuhn203 4 Phrancis 4
 
2:00 AM
Huh, I'm close to the top of the charts on the main site too:
 
two dao design questions in a row by the same OP :-|
 
> The constomer DAO:
c(on|u)s(to|u)mer
 
yep
 
What's that @Phrancis?
 
I (attempted to) write regex
 
2:09 AM
Oh hey. Look at that. I had no clue I'd gotten any.
That's nifty.
 
Any... what? @RubberDuck
 
Downvotes. I never noticed. I'm curious which ones they were. I'll have to look and see if I screwed up any answers.
 
@rolfl What is that? Downvotes cast?
 
2:31 AM
^ yes
 
0
Q: Print all nodes that are at distance k from a leaf node

JavaDeveloperGiven a Binary Tree and a positive integer k, print all nodes that are distance k from a leaf node. Here the meaning of distance is different from previous post. Here k distance from a leaf means k levels higher than a leaf node. For example if k is more than height of Binary Tree, then nothing ...

 
Good question @CaptainObvious
 
No, it looks like downvotes received.
 
Oh, I was doing something else. :P That could still use an edit.
 
@nhgrif ^^
Monkey's query looking for 3s
 
2:35 AM
Yes, 3s on a post by userid
codereview.stackexchange.com/users/28539/javadeveloper <-- #1 on the list, but his profile says 0 downvotes cast.
He's the most downvoted user, not the user casting the most downvotes.
 
Yeah, that's what rolfl queried for
You're way down there at only 2 downvotes received
 
I have two downvotes on main and two downvotes on meta.
 
Sounds like a pretty good record for an active user, if you ask me :)
 
Which is interesting, considering my apparent my-way-or-the-highway attitude.
The only downvotes I don't mind seeing no comments to are answers on meta. Though, for downvoted answers, I consider other answers which offer a contradictory answer to sort of count as comments as well.
But meta answers are essentially just options on a ballot
 
In short yes it seems so ^
 
2:40 AM
and we vote on the answers as a community. The answers with the most upvotes are the ones we act on as a community
I was amazed that this had 3 great answers before I got on it:
11
Q: Using a Dictionary to retrieve BOOL values

MaKoI have some values pulled from a web service giving me a bool value for a key. I did it this way, but feel like it is repeating without need. How can I refactor this? Please note that the key on the dictionary has the same name as the object property. for (NSDictionary *itemDicto in switchesA...

There wasn't even anything left for me to comment on.
 
I haven't been here long enough to know, I'm a post-"The Mission" user lol.
 
"The Mission"?
 
That's a good problem to have.
 
I agree
syb0rg recruited me out of the ObjC chat room on StackOverflow.
 
15
A: What's a Zombie? And what are the many other memes of Code Review?

Mat's MugMeme: We could really use your ammo Originator: syb0rg Cultural Height: Side-effects of The Mission? Related: out-of-ammo and DVLR (daily vote limit reached) Background: Activity on CR has recently taken a hell of a spike. 40 votes/day isn't enough ammunition to shoot at all the good answers ...

 
2:43 AM
Well... I sort of agree. I'd like the gold badge for Objective-C.
But we still need like 80 more questions, plus I need a lot more upvotes.
 
I have no idea how I stumbled in here to be honest.
 
@nhgrif I believe we're still struggling with the growing pains of CR and these kinds of discussions are healthy
 
Yeah. I'd like my vba badge, but it's still like 20 questions from even being eligible for bronze.
 
Also, I'd like the unclaimed gold badge but that's gonna be a while
 
Healthy yes. Also tiresome and distracted.
 
2:47 AM
You don't have to take part in the meta discussions.
 
We barely get one thing reasonably decided before something muddies the waters more.
 
I wouldn't stick around CodeReview for very long if I read every question posted.
 
I'm too outspoken not to. =)
And I care just as much as anyone else about the site.
 
When I posted my first VBA question there were 8 of 'em. 20 is going to be faster than you think ;)
Entertaining catch-up read...
brb
 
This somehow still has no answer:
5
Q: Questions about speed/memory comparisons

nhgrifThis question should be considered as an expansion discussion on the policy discussed in Should comparisons of code snippets be closed as "not seeking a code review"? For comparative reviews of two code snippets, should we consider questions which ask "reviewers" to determine which code snippet ...

 
2:57 AM
I think CR is a bit like SO, in a way, except that nothing seems to be really "off-topic" for SO, they just kind of get what every other programming site decides is off-topic. CR will review any language, given it is on-topic, unlike other SE sites like DBA (and others I can't think of). I think we have a superb community of regular users, each with their own niches, and a few irregulars, and overall we're doing good work (although sometimes misunderstood work)
 
DBA will review any language, as long as the question is about database administration.
So will programmers, because on programmers, the actual code doesn't matter as far as I know. They're just going to look at it and deal with the idea of what the code is doing, right?
 
Please phrase your question in the form of a question and your answer in the form of an answer. — Alex Trebek Aug 16 at 20:14
This made me laugh, but he's got a point.
Maybe you should clear up your thought process and edit the question.
 
The way I see it, DBA won't touch anything like PHP, JS, etc. and Programmers won't touch anything asking to see if the code (as opposed to the concepts) is good... there's a bit of overlap but I don't think it's excessive
 
@Phrancis I tend to see it the other way around: the smaller sites get what SO deems off-topic. Although that seems to have improved quite a lot lately
 
2
Q: Does this count as example code?

nhgrifA c# question was just posted: Set desktop background. One of the lines in the posted code looks like this: string json = webClient.DownloadString("super secret website url"); Clearly, in the actual source code, this is a URL and not an example string. Does this count as example/filler/stu...

 
3:03 AM
I've posted stuff on DBA that was flagged as off-topic and should go to CR (irony)
 
What does PHP have to do with Database Administration though?
 
^ exactly
 
It's off-topic not because it's PHP, but because it has nothing to do with DBA.
None of the stack exchange sites are specifics to a programming language (most have nothing to do with programming)
They're specific to a particular topic.
 
I think the curse of CR is its name, "Code Review"
 
You can ask programming questions on Security.StackExchange.
If it's about security.
 
3:05 AM
How so @Phrancis?
 
Curse?
It's not the name, it's the zombies!
 
But you can also ask about how physical locks on the front door of your house on Security.
 
I'm not suggesting we change it, but I am saying that a lot of people (including myself before I joined checked the FAQ) had no fudging clue what a code review is
 
Because the topic of Security is Security.
 
And they all work with me...
 
3:09 AM
@CaptainObvious JDQ#183
damn
 
Not only is JQ the only Socratic user, he's the most downvoted user.
CR trivia
 
Socratic?
 
ah
 
I think I'm 2nd, with 52 questions
Socratic is serious commitment
 
3:13 AM
No kidding
 
I don't understand how you post that many questions without writing at least one review.
 
^^ that.
I guess it's his way of contributing to the site.
 
It's like learning to read, but never to write (or vice versa) you never really master either without the other.
Yeah. And I'm not bashing JQ. I just don't understand.
 
> According to a rough SEDE query, at least a total of 9540 reputation has been created on the site thanks to answers to the questions posted by JavaDeveloper.
 
Which is astonishing. He deserves that badge.
 
3:17 AM
totally
 
I'm curious if it's all code he's actually written himself.
 
@RubberDuck yeah
and almost all (all?) his code is always related to interview-like, data structure questions
 
Yeah what @h.j.k.? I'm on mobile. Can't see the reply.
 
5 mins ago, by RubberDuck
I don't understand how you post that many questions without writing at least one review.
 
Ahhhh. Thanks Mug.
 
3:21 AM
So...
Is it at all possible to do an SEDE query to see what close reason was selected for questions that are closed/on hold?
 
bah, I'm sure he'll end up contributing answers too, eventually. at least perhaps those related to interview-like, data structure questions.
 
maybe we need a new catchphrase for it, once-in-a-JQ-answer...
(sorry, i know it doesn't ring)
 
Yes @nhgrif. Close reasons are there.
 
if the post wasn't deleted, yes
 
Well, kinda. I need to dig a little more.
 
3:26 AM
Yea... this is confusing to me.
I work on a pretty big SQL Server every day. The hardest part about any database is learning all the table relationships and what the different status columns mean.
 
I think you have to link posts to votes to close reasons somehow
I'll try to remember to look tomorrow. I'm tired.
 
@nhgrif true
 
@nhgrif - I should put together a blog .... but, you will need this too:
110
Q: Database schema documentation for the public data dump and SEDE

Stu ThompsonStack Exchange releases "data dumps" of all its publicly available content roughly every three months via archive.org, and also makes that information queryable over the Internet at the Stack Exchange Data Explorer (SEDE). Over time, as new features and other bits of data are introduced to Stack ...

 
Monking @all
 
Monking Heslacher
 
3:55 AM
@Vogel612 Yes. Just because you can type it, doesn't mean that it is correct. Especieall if in C# there is no SQLConnection but a SqlConnection and ther isn't a SQLStatement but a SqlCommand. I have testet it, read about it and it is just a fact that you can do this, but the objects in question needs to be either of the same type or what you can do is the following which isn't a pretty solution.
using (IDisposable conn=new SqlConnection(connString),
    command =new SqlCommand(sqlString,(SqlConnection)conn)){

    ((SqlConnection)conn).Open();

}
17
A: using various types in a using statement (C#)

JosephYou can do this though: using (IDisposable cmd = new SqlCommand(), con = (cmd as SqlCommand).Connection) { var command = (cmd as SqlCommand); var connection = (con as SqlConnection); //code } Perhaps that would be satisfactory to you.

 
@Heslacher why IDisposable and then cast?
I'd use var and walk away happy with an SqlConnection..
 
Try it. You won't succeed.
 
what do you mean?
using(var connection = new SqlConnection(connectionString)) { }?
 
The problem is about using with multiple objects of different type.
 
hmm I just stack'em
 
4:02 AM
what do you mean by "stack'em" ?
 
using (var cmd = new SqlCommand())
using (cmd.Connection)
{
    // code
}
the accepted answer 's like a hack
 
This is bad. This is like if () with no brackets.
 
@Heslacher it's a compromise between 4-5 levels of indentation and a blissful lack of curly braces
 
@Mat'sMug Right, but is is the only possibility if you don't want to nest the using's nor want to use the stacking.
@Mat'sMug Right, but I would only doing it if I hav no other possibility.
 
1 min ago, by Mat's Mug
@Heslacher it's a compromise between 4-5 levels of indentation and a blissful lack of curly braces
Makes good C# sound like lisp
Fixed link
 
4:16 AM
@rolfl is there close vote data in SEDE beyond 2013/06?
 
4:29 AM
0
Q: Scrape an HTML table with python

CreekI think I'm on the right track, but ANY suggestions or critques are welcome. The program just scrapes an HTML table and prints it to stdout. import sys from urllib2 import urlopen, URLError from argparse import ArgumentParser from bs4 import BeautifulSoup def parse_arguments(): """ Proces...

 
That was some wonderful code to review
0
A: Scrape an HTML table with python

mleyfmanIn general, your code is very well written. PEP8 compliance is very good, names make sense, you have docstrings, you use `if name == 'main:'. Here's a few comments on what I would do differently: # Get table try: table = soup.find('table') except AttributeError as e: print 'No tables fo...

 
5:10 AM
Nice answer @mleyfman
 
@Phrancis I had to nitpick because there wasn't anything else to review
 
Sounds like the kind of "asker" that should become an "answerer" right?
 
Yeah
He clearly knows all the basic things we latch on to
 
He's decent rep on Unix
 
Makes sense
 
5:16 AM
71 answers no questions
 
He's just that boss
 
Kind of weird to have +2k rep and no avatar; but at least he's not @user12986234867
 
5:31 AM
I hope I can reach 2k by the end of the year and it's a conscious decision of mine not to have an avatar :p
 
I'm sure you'll be 2k by this time next month, just hang around in chat it works wonders!
 
+1 :D
i rate limit myself hahaha
don't want to get too addicted here :p
 
5:49 AM
After reviewing the optimizing poker hands question from project euler earlier today, I found my old solution from several years ago... it was 231 lines long... with 1 function that was 163 lines long
 
Sounds... bloated?
 
Yeah... it was very thorough though... It would check all 5 cards in a high-card vs high-card situation
 
Sounds like you may have a selfie code review if you can write it better now!
 
Yeah... It'll take some time to comb through, but I'll see what i can make of it
If I start adding classes and such it might bring me up to like 400 lines but it will be beautiful
I should start experimenting
 
Yes, you should
 
6:06 AM
Magic numbers, no docstrings and the mother of all condition chains... This is gonna be good
 
SQL was not designed with that in mind at all... but I'd be curious if I could hack it to solve Euler 54
Probably be ugly as hell lol.
 
 
1 hour later…
7:09 AM
1
Q: Android audio player

Ankit GargI want to implement basic audio functions like play, stop and pause. I have stuffed all the code inside onCreate method. Is this best practise to follow? public class MainActivity extends Activity { Button start,pause,stop; @Override protected void onCreate(Bundle s...

 
7:43 AM
0
Q: Is this the best and proper way to emulate __uint128_t

Peter SmitI developed a lot of code locally with __uint128_t only to find out that it is not available on the target platform. I am now trying to write my own struct that emulates the operators of __uint128_t I need: =, ~, ^, &, |, ^=, &=, |= This is the code I have now, it will be compiled with a c++11 ...

0
Q: Open a contents of file using swing and SwingWorker class

YuvrajI want to open a file contents using swing.For this I used SwingWorker class.This application took more time(more than a minute) to load a large file(nearly 40MB). I want to improve the performance of the open file contents.Check it once. Sample code: public class OpenSwingWorkerTest { public s...

 
0
A: Ping and write the Status, think it can be improved (Runs on GUI Thread?)

HeslacherAs it is not really much code so let us just focus on the label part and a little naming TimesBufferClear++; if this is a varaiable, it should be named camelCased if it is a property it follows the naming convention. currping can be renamed to currentPingStatus which is more meanin...

Zombie killing
 
[http://codereview.stackexchange.com/users/current?tab=badges](You've earned the C# badge)
 

« first day (475 days earlier)      last day (3533 days later) »