« first day (787 days earlier)      last day (3227 days later) » 

4:00 PM
This would've been better asked at Code Review if at all. You should show some own effort to optimise however. — Bergi 53 secs ago
 
@Donald.McLean That would make sense, especially for big data.
 
I'm thinking something like this: system -> on_application_start -> my_app { ... }
 
We will be replacing hardware for two of the #stackoverflow edge routers at about 18:00 UTC today. No service disruption is expected.
 
@Hosch250 I was mostly thinking in terms of user and team data. Creating new ways to use and manage information such as contacts, email, documents, family tree and history information.
 
@EthanBierlein You're on Windows, right?
Try the Event Viewer.
 
4:08 PM
Ladies por favor
I'm in Argentina
Keep the panties on
2
 
4:22 PM
I would not make a good caveman
Can't even light a fire in a wood-stove
 
This weekend, I saw someone failing to light a fire with a lighter and lighter fluid.
And cardboard.
(and sticks and other fuel)
 
0
A: Case Study - Basic sales tax

Hosch250Greg has given you an excellent review. Here are just a few more comments: switch (_typeOfProduct) { case ProductType.ExemptedProduct: break; case ProductType.TaxPaidProduct: tax += _productPrice * .10; break; } I would just use an if right there because you only tak...

I've never tried to light a fire, so I don't know if I could.
I love fires though.
#WhatIDidntKnow - Use Decimal for money.
 
4:40 PM
0
Q: tic-tac-toe command line

abaldwin99I created a simple tic-tac-toe. I'm looking for any critiques from a code standpoint...general structure / style / efficiency. Unfortunately I couldn't get a live demo working because of the dependency on the nodejs library prompt. /* A simple Tic-Tac-Toe game implemented in Javascript V8 3...

0
Q: DICOM Image Orientation evaluation in Java

Psi Lambda DeltaI have been trying to find this out since a long time, but due to lack of any experience in Java, I am totally lost. I want to do some operations in DICOM in Java. I have used ImageJ library to simply open the image. DICOM dcm = new DICOM(); dcm.open("/Users/shrushritasharma/Dropbox/dicom/IM-000...

 
@JeroenVannevel did you see this? ▼▼▼
5
A: 2015 Community Moderator Election - Nomination Requests

MalachiI think that @JeroenVannevel would be a good Moderator as well. He has more than once been there to help me understand coding aspects, and also had the patience to explain things to me through chat. I know that he is in a different Time Zone than a majority of the users on CR as well, so it wou...

 
@nhgrif That's pretty pathetic...
 
@Donald.McLean Like a register?
@nhgrif Without knowing what fuel it was, there is no conclusion.
Diesel can't be lighted with a lighter for example.
 
wow it's fairly warm,
 
@Mast you need compression first, right?
 
4:51 PM
@Malachi At least.
Diesel engines are slightly more complicated than gasoline ones, but close enough.
 
The oil used on the Blackbird won't explode into flames when it is thousands of degrees hot, IIRC.
 
@Mast Oh, not really.... not mechanically.
 
@rolfl You're right, but that would get too complicated for this chat.
 
That bird gets so hot while flying that when they raced it across the country to get ready for the release (there was an information leak, and they had to reveal something) the fire extinguishers went off in the hanger when they pulled up.
 
Once I was out of lighter fuel for my smoker, so I managed to light it campfire-style with tinder and small branches, t'was an interesting learning experience
 
4:54 PM
@Hosch250 The Super Blackbird is a motorcycle (Honda 1100 XX something?), what Blackbird are you referring to?
 
SR-71.
 
@Phrancis You really wanted that cigarette!
 
@Hosch250 Stealth fighter right?
Or bomber I think it was.
 
No, spy plane.
 
@Mast When I say "fuel", I mean fire fuel. Sticks and stuff. He had lighter fluid like what you use to get a grill started, a lighter, cardboard, and sticks, leaves, pine needles, etc from the yard.
 
4:56 PM
Strategic Reconnaissance, or something.
 
@nhgrif Ah, explains.
 
1
Q: SQL Insert after Create Table in the same script

loliI am making a script that creates some tables and then I need to add some values in a table(5 entries). Currently I am repeating this code block 5 times with different values. What's the best way to deal with this? I thought about putting the first half of the query in a variable but i'm not sure...

 
@nhgrif probably all wet
 
In Arizona?
Well, I guess trees need water, and Arizona isn't all desert.
Cardboard though? The cardboard around here feels kind of gluey or something, I wouldn't be surprised if it didn't light up very well.
We have an 11'th candidate.
They don't agree with @nhgrif stand on the community watching the mods.
 
@Marc-Andre No no, a smoker, like a meat cooking device ("fumoir")
 
5:08 PM
ohhh
Nice then :P
 
@Hosch250 If you call that an 11th candidate...
Nothing personal against the user in question, but he stands no chance.
 
Don't why I thought it was a cigarette ... I'm tired :P
 
The system does, and it will get us to the primaries.
 
This question would be better fit on the Code Review SE site. — Evan Carslake 9 secs ago
 
@Duga He's right.
 
5:12 PM
There's really not much to review about insert statements, they are, after all, quite simple, if you're inserting into a single table... — Phrancis 13 secs ago
I VTC ^^
Stub code
 
That sounds like a challenge
make an insert statement which is complicated enough to be worth review
 
INSERT INTO [dbo].[life] (meaning) VALUES (42)
 
Anyone here attempted to replace a REST API with WebSockets (based on STOMP for example)?
 
@skiwi o7
 
@DanPantry o-seven?
 
5:25 PM
it's a face saluting
either way i have experience with both, can't say i've tried to replace them but i can probably still help
 
I just made a very very small example, and I realized I kinda want to have code like $.ajax(url, function (response) { }), but that seems to be hard to do using WebSockets/STOMP
As with STOMP you get to subscribe (where you can attach the listener) and send individually
 
if you want the kind of declarative sending ajax has you could always introduce your own sugar over stomp
(i've never used stomp, I've used sockjs, socketio and primus though)
 
@DanPantry Using SockJS here to wrap the url to support unsupported browsers
 
i would say though that you shouldn't try and convert REST -> websocket unless the REST should not have been REST in the first place
 
I'm thinking of creating a setup using JSX and Flux, if those names are meaningful to you; then in Flux stores I could subscribe to all relevant STOMP topics and unsubscribe once you leave the page, or something like that
 
5:29 PM
That makes sense to me :) And it could work nicely.
 
@DanPantry The former may be the case, as I'm having REST calls like /api/user/create_user etc.
 
http://www.commitstrip.com/en/2015/06/30/coder-dilemma-6-choosing-the-right-stack/
CommitStrip - Blog relating the daily life of web agencies developers
Coder Dilemma #6 – Choosing the right stack
CommitStrip
1435685361
 
"output is exactly what I want, but the code itself is ugly and far from being object oriented" - this sounds like it should be on codereview.stackexchange.comIanAuld 20 secs ago
 
/api/user/create_user -> POST /api/user/
 
From past experience in an university project we were really missing the option to be able to have a full duplex channel
 
5:30 PM
i dont think turning a create user command into a web socket makes sense personally
 
To me it seems weird to have both a REST API and a WebSocket/STOMP API, or is that not too weird?
 
I don't think it's weierd
weird
they serve different purposes
 
And appareantly WebSockets are more efficient than HTTP/REST
 
well, naturally, yes, they are - they use less http overhead
however they're also really annoying to use if you're using it outside of a web browser (websockets)
I would personally keep the rest api and the websockets separate
 
Well, nobody needs to interact with my RST API anyway :P
 
5:31 PM
and only use the websockets for things that actually need duplex communication
 
monknoon!
 
hello new person who is probably not new but new to me nontheless
4
 
@DanPantry Hmm okay, it's probably the best
 
I'm voting to close this question as off-topic because it should be on codereview.stackexchange.com (after having the relevant code added to the question) — IanAuld 42 secs ago
 
@DanPantry Hi!
 
5:33 PM
When I started off with researching this I thought WebSockets/STOMP could replace REST, but that was maybe a bit too hopeful
 
@skiwi i honestly think unless you need the duplex channel for EVERYTHING, that replacing everything with websockets is overkill
could be a fun exercise to learn meteor with though
 
I'm voting to close this question as off-topic because code optimizations on working code are for Code Review Stack Exchange, not here, but read the help center before you ask any questions there. If you plan on asking this question there, it should be deleted here first. — Anonymous 13 secs ago
 
Aw, I think it's too bad that this question was deleted by OP. I would have had an answer :(
I mean, if it would have been edited to be on-topic, that is..
 
This user just nominated themselves for CR moderator.
 
@DanPantry Okay
 
5:36 PM
> Apparently, this user prefers to keep an air of mystery about them.
hm.
 
in Code Review Moderator Election 2015, 5 mins ago, by Jamal
I think many (popular) elections will attract some... interesting nominations. Unless someone withdraws, we'll be going to the primary phase.
 
What about if you have some method to delete a bunch of things, would that be a possible candidate for WebSockets if you want to inform the user of the progress? (Assuming it's not an SQL delete statement, then the argument is void)
 
0
Q: Enumerating Chess Piece Moves

YuushiThere was a question asked recently here that went through enumerating moves for a chess piece. I was going to write an answer for this question, but while I was bashing out some code to throw into an answer, I figured why not build it out completely instead and have it critiqued. Note that this ...

 
@skiwi delete returning a list of successful or not successful deletion ?
 
@skiwi if you want to inform a user of the progress then yeah you could use websockets but you could also use longpolling (used as a fallback to websockets) or jsonp (only if you have nothing else to use!)
in that scenario i would use websockets, though
 
5:40 PM
Ok, I'm trying to think about candidates in a business application... Probably not too much
If all you do is entering data and viewing data
 
if it's a CRUD app, use REST. That's what it's designed for.
if you actually need real time, that's when you start using websockets/jsonp/long polling/magic
 
Is there any hope for "CRUD generators"? It's a bit cumbersome to make CRUD things yourself, but you often want more complex views, etc.
 
what do you mean crud generatosr?
plenty of web app frameworks have boilerplate generators and/or libraries that cut down on boilerplate
 
insert joke about most legacy code being crud generators :)
 
see yeoman and surface respectively from the npm ecosphere
begrudgingly upvotes @DanLyons
 
5:44 PM
This application is not very big though, I'm thinkign to stay away from the generators
I'm not sure if I can find suitable stuff if I want to make the application itself in React/JSX
 
you're on your own there, ive never used react
 
I more meant that CRUD generators often do not give you lots of options to change their style/behavior, etc.
 
well i mean
it's CRUD
:p
 
huh?
 
5:52 PM
now, is that n-c, obsolete, too chatty, or what?
 
Why?
I didn't do it.
 
Is Quill's comment being flagged?
 
0
Q: Multiple INSERT after CREATE TABLE

loliI need to insert 4 rows after I created a table. Is there a better way to do this than what I did? Here's the full code, even though only what is after "/*************INSERT VARIABLES WEB****************/" is relevant to my problem. I don't want to create a stored procedure in every user's databa...

 
That's not the point, the point is that, it's flagged, and as a moderator, I cannot tell who it is that flags comments.
 
codereview.stackexchange.com/a/95229/36366 Is this question hot or something? +10 in a single day. I think that's a first for me...
 
5:54 PM
@nhgrif Yes.
I saw it in the list earlier.
 
now, is that comment needed? Probably not. If it was "obsolete" or chatty, I would have probably just done it.....
So, dismiss the flag, delete the comments, and move on.
 
This question might also be appropriate for Code Review, especially if you're after a more detailed discussion of various aspects of your code. — 5gon12eder 13 secs ago
 
0
Q: Critter Tracking: When does it cross it's own path?

WernerCDSituation: A critter starts at (0, 0) on a cartesian graph. We have a non-empty zero-indexed "moves" list that contains numbers. Each number represents the distance moved. (Similar to this question) The first number is the distance north, the second is the distance east, the third is the d...

 
@CaptainObvious totally read that as CRitter Tracking
 
@Mat'sMug Hahaha, you're not alone!
(Or... I'm not alone)
 
6:09 PM
I am starting work on upgrading the #stackoverflow #stackexchange edge routers. Once again no disruption expected
 
chocolate is so freakin delicious
 
everything can be made better by adding either bacon or chocolate
3
 
I have pizza and I will not add either to my pizza.
But I do hav echocolate icecream for afterwards. I'm healthy
 
What about with?
 
bacon on pizza is tasty, and chocolate on dessert pizza is tasty, too :)
 
6:18 PM
Ever had chocolate covered bacon? Nom nom nom.
 
Chocolate covered bacon is amazing in small amounts.
 
bacon covered chocolate
 
@Mast I'm not sure what you mean here.
 
0
Q: Trying to determine why a slight code change caused a large performance gain

canadiancreedI'm currently refactoring some old code of mine that I had done a few years ago, where it takes in two Lists to compare their contents, and then return the mapped contents that were matched. With 750 items for potential needles, and over 25000 items as the haystack, the original code took about 2...

 
Welcome to Stack Overflow! I believe that this question is too broad for this format, but i would like to direct you to codereview.stackexchange.com where people would be more willing to provide larger-scale critiques of your code. — DLeh 14 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comBrent Washburne 59 secs ago
 
6:29 PM
Because the answer is from the mattt, who wrote AFNetworking. — Joshua Dance Sep 30 '13 at 17:17
 
If this is working code that you think could be improved, see codereview.stackexchange.comjonrsharpe 57 secs ago
 
0
Q: Implementing a JMS consumer - is this best practice?

Miguel PortugalI need a standalone client that consumes messages from the queue every time a message exists. I already have set-up an ActiveMQ queue named hello.world. Here's my code: ConsumerClient.java public class ConsumerClient { public static void main(String[] args){ Thread thread = new Thread(new...

0
Q: Find allele frequencies at each site for each iteration for each population

Remi.bI am new to BioPython. Below is my first script. It works but it is quite ugly and not really performant. The script takes a FASTA format file in input and outputs the frequencies of each amino acid (A, C, T and G) at each site per population per iteration. The name of each sequence looks like >...

 
6:47 PM
@Jamal This is :
13
Q: Do we need any more [programming] [practice]?

JamalThe first tag has been recreated multiple times, while the second is likely a variation of best-practice, which was previously removed and temporarily blacklisted. They are about as useless as review and may still likely come back until the tag-creation privilege increases to 1500 rep.

 
The proper location for your question is Code review from StackExchange. — Andriy Tsok 36 secs ago
@AndriyTsok Code Review does not help implement new functionality, but rather reviews existing, working code. — Hosch250 1 min ago
 
0
Q: Parsing JSON string from http request

Wenqin YeHttp request is made, and a json string is returned, which needs to be parsed. Example response: {"urlkey": "com,practicingruby)/", "timestamp": "20150420004437", "status": "200", "url": "https://practicingruby.com/", "filename": "common-crawl/crawl-data/CC-MAIN-2015-18/segments/1429246644200.21...

posted on June 30, 2015 by Alexey

I'm writing multithreaded application and have just cought an error. Application makes large amount of requests in Thread-1 for a time lapse and some several requests in Thread-2. And some of the requests in Thread-2 sometimes fail. There is a traceback: return self.__rd.set(name, value, ex, px, nx, xx) File "/usr/local/lib/python3.4/dist-packages/redis/client

 
The part of the question that asks "Is this the best way to do this?" is indeed best suites for Code Review. The rest, not so much. — Lasse V. Karlsen 31 secs ago
 
Strange, Firefox is getting rendering issues after having it open a few hours with 1700 tabs and it using 2,5 GB memory
 
@skiwi I bet that isn't a heavily tested use case (if tested at all).
 
6:55 PM
monking @QPaysTaxes
 
Going on a walk, BBL.
 
@janos
0
A: 2015 Community Moderator Election - Nomination Requests

Simon André Forsbergjanos He's been one of the most active answerers on Code Review for a while, is currently the top 3 user based on reputation. He's friendly in chat and friendly in comments. Overall I think he would be a good candidate.

 
0
Q: Readability and Goto

Shelby115I've always been told "never use goto, there's always a better way" and for the longest time I just accepted it. Lately though, I've been running into such scenarios in which I have to repeat this bit of code every time I return early. I personally hate repeating myself, even the littlest bit of...

 
7:14 PM
1st line of the question: "How would you refactor this ". See codereview.stackexchange.com/tour "Code Review is a question and answer site for seeking peer review of your code". — Shiva 17 secs ago
 
evening @all
 
Aaand @rolfl outdid me with his answer
 
Yeah, definite am never going to do that. I refactor my code on a weekly basis to keep my productivity high :D — Shelby115 5 mins ago
Whaaaat?
 
waaaaaaaaaaat
 
@rolfl Since when can you fluently write C# like that? (In your answer)
 
7:20 PM
@skiwi Since I learned Ctrl-C Ctrl-V.
(I have no idea what the this means in the static method declaration though).
 
0
Q: Abstract syntax tree for simple Lisp-like language interpreter

rookieA week or so ago, I wrote a binary expression calculator with the hope of better understanding how interpreters and compilers work. In the same vein, I've tried to write a lisp like language interpreter in C#. So far, I've only written code to represent the abstract syntax tree, and haven't writt...

 
This question might fit better on [codereview.stackexchange.com](codereview.stackexchange.com) as it seems to "request a code review of otherwise working code," as described here. — OhBeWise 39 secs ago
 
@rolfl But you wrote it ;)
 
Good day.
 
7:37 PM
0
Q: Separate business logic from Data Access Logic in the repository

ElisaI have a PupilService which is calling the PupilRepository.AttachPupil() method. I have a N to M relation between SchoolclassCode and Pupil. Technical logic: A pupil can be related to many SchoolclassCode like "Math 7 a" or "English 8 c". Business logic: 1) A pupil can be related only to Sch...

 
@rolfl it makes it an extension method, extending the type of this
So that method can be called on any instance of that type whenever the extension method is in scope
Now, where's that answer so I can upvote it?
 
4
Q: Readability and Goto

Shelby115I've always been told "never use goto, there's always a better way" and for the longest time I just accepted it. Lately though, I've been running into such scenarios in which I have to repeat this bit of code every time I return early. I personally hate repeating myself, even the littlest bit of...

 
0
Q: Is this violation any principles in EF6 and MVC5

thefenryI am learning mvc 5 .net and this is a bit different than rails activerecord when creating relations. I have created a basic survey app that has a Survey class and this relates to the questions and answers. When I create the survey I want to create a few questions to go with the survey. Would t...

 
7:54 PM
probably a better fit if posted in code review — Fred -ii- 20 secs ago
This question appears to be off-topic because it is a code review request. This is better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 7 secs ago
 
0
Q: Lua Binding for C++ render engine

MattMattSo I've been recently working on a lua api for my C++ (11) render library : It really has grown at the point that I think scripting would make things much easier: So I've implemented a lua interface for some of my C++ classes and functions; there are really a lot so I will only show Window and In...

 
This question could be suitable for Code Review, as long as (a) your code works as intended, (b) your code is real code, rather than example code, and (c) your code is included in the body of the question. If you wish for a peer review to improve all aspects of your code, please post it on Code Review and delete your question here on Stack Overflow. — Phrancis 59 secs ago
@BobHorn I don't frequent the UX site that much, so I can't say with certainty that it is; I only know that they allow highly opinionated questions/answers on that site. If you're concerned specifically with the implementation efficiency/elegance of your code, maybe consider Code Review, instead? — TylerH 45 secs ago
 
8:39 PM
8
Q: July 2015 Community Challenge

Hosch250What should we do this time? Feel free to resubmit non-winning ideas from previous rounds, although new ideas are usually more successful. Post an answer to this question with your challenge Vote for those answers which interest you At the end-of-day on Tuesday, June 30th, the most-voted post w...

Getting close to closeout time on that ^^^^
 
8:52 PM
@TylerH I don't think this would fare very well on Code Review, unless they posted all the code, instead of just a few lines. It would likely get closed as "stub code". Thanks for recommending us though! — Phrancis 40 secs ago
 
@rolfl hey when did I get -4 there?!
 
@Mat'sMug No idea... I can add another one if you want?
 
eh, screw it
 
I personally like @Mat'sMug idea better, because it could be quite useful. Although, my SEDE query works pretty good for that too ;)
 
9:01 PM
0
Q: LRU cache design using dict and doubly linked list--python

FihopZzDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1. set(key, value) - Set or insert the value if the ...

 
@Hosch250 What is this crap? is this your Sock?
 
@Donald.McLean Like the Windows register, used in 2000 and the likes.
 
@Mast I saw that. you just self-pinged ;-)
 
@Mat'sMug Copied the wrong link (a)
 
TTQW
later folks!
 
9:11 PM
@SimonAndréForsberg Why don't you explain how this is 'on topic' on Stack Overflow? stackoverflow.com/help/on-topicShiva 30 mins ago
sigh. I'm glad I'm not running for SO mod.
I won't continue that discussion.
 
@SimonAndréForsberg That question reads more like a feature request than a review, but I can understand the confusion.
 
Hello
 
@ThomasJunk Hello!
 
hi @rolfl
 
Hey there.
On a conference call too ;-)
The query will be "wrapped" in a new order, when you have your first line (the default order).
 
9:16 PM
took me a sec ... I answered before on my Nexus ... had too boot up my computer @rolfl
 
then, you will re-wrap that wrapped order again, with the field order).
In the OP's code, the order will never be wrapped.
 
so it works like chaining?
 
yeah.
 
oops
no, that was not my intent
i thought simply query was overwritten and re-ordered
 
No, you chage the query to be a wrapped query, then you wrap it again. If you kept a pointer to the original query, then it would be OK to wrap that in the try-block
 
9:21 PM
@Mast Perhaps. I'm not a Windows person, so I don't really know anything about register.
 
@Mast IMO, it could probably work on CR. But that doesn't make it off-topic on SO. IMO, it can work on SO too.
 
Let me put up an example though.
 
@Donald.McLean Neither am I, but I've had to hack around in it a couple of times to change some idiosyncratic values.
@SimonAndréForsberg Yes, it would work on both.
 
so, simply a var result should do the trick? result=query.orderBy(BLA)
 
So, one of the problems I have with contacts is that everything is flat. For example, home address and home phone number are two completely different fields, and not shown as being related.
In reality, the "home phone number" is the landline of a specific address which is the "home" of the person. But it could also be the home of other people to. So if your cousin Bob is connected to a particular home, then Bob's wife would also be connected to the same home.
 
9:25 PM
@Donald.McLean You want a relational database?
 
0
Q: Faulty end of game

Jack AylettMaking another simple game, and this time my problem is the final number. The basis of the game is two players choose a number between 10-50, and have to take it in turns deducting either 1,2, or 3 to race to be the first to reach 0. The only problem is despite trying everything I know, the value...

 
@CaptainObvious Broken.
 
@Mast No. Relational databases can only relate things that the programmer says are related. In reality, many things are related.
 
@Donald.McLean Ah, I understand.
I'm not sure what the term is for what you're looking for, but it's probably quite hard to implement properly.
 
@Mast If it was easy, it wouldn't be any fun to try.
2
 
9:29 PM
@Donald.McLean True that.
I'm not even sure what the ideal languages would be. I'd probably CSV it with C++, with keywords indicating their data is in another castle.
But that would be needlessly complex.
Perhaps some ODBC with a real database?
 
@Malachi @Mat'sMug asked where @rolfl's answer was.
 
@Mast The internal storage used by the data server could be implemented any number of ways. The API is going to be tricky too.
 
@rolfl @Mat'sMug Duel!
8
Q: July 2015 Community Challenge

Hosch250What should we do this time? Feel free to resubmit non-winning ideas from previous rounds, although new ideas are usually more successful. Post an answer to this question with your challenge Vote for those answers which interest you At the end-of-day on Tuesday, June 30th, the most-voted post w...

 
@Hosch250 Or do you mean "duel"?
 
Thanks, @Donald.McLean.
Do I call it off if you don't break the tie, or do I pick?
 
9:36 PM
@Hosch250 I'll break the tie, which side do you want to break?
 
You pick.
 
I'll break it!
STV has been nominated so many times and almost made it last time. I think we should give it a chance.
 
Isn't it just twice?
@rolfl You won the CC.
Congrats.
3 Nice Answers and an Enlightened on Meta today.
 

« first day (787 days earlier)      last day (3227 days later) »