« first day (979 days earlier)      last day (3038 days later) » 

12:00 AM
RELOAD! There are 1647 unanswered questions (94.5503% answered)
 
Possible duplicate of Which answer to accept?Mast 11 secs ago
 
The downvote belongs to me, the question has been asked before
 
I forgot how fun reviewing code was. I should try and do it more often.
2
 
@Quill CV as duplicate in that case.
 
I didn't realise there was one going yet until you posted the comment, I DVed like 15 mins ago
but yeah, have my CV
 
12:01 AM
OHAI JNat
 
;_;
 
/me off for bed, finally at a halfway sensible time again :D
Niters
 
Later!
 
Vogel, did you see some AOE2 guide?
 
Nice to see you around @nhgrif - Haven't seen a blog post in a while, been very busy with work & life I assume!
 
12:27 AM
now I have to sleep, bye
 
22
Q: We're standardizing the sidebar width at 300px on all sites

abby hairboatStack Exchange sites are ad-supported. We run relevant, unintrusive ads that don't get in your way--but they help us keep the lights on. Even sites that don't have paid external ads usually have a few internal ones, used to promote other sites on the network and whatever else each community feels...

 
12:52 AM
@Hosch250 I don't pass any object in.
 
You can.
 
D:
 
CommandParameter, I think it is called.
 
@Quill I smell a community ads announcement soon
 
probably
3
Q: Bulletin box icon appears as site icon instead of Stack Overflow

QuillIn the community box at the moment is a link to a Stack Overflow Developer Survey, however viewing this box on sites other than Stack Overflow, it uses the site's icon instead. The cause is on the favicon icon div: Instead of a class of favicon-<sitename>, it should be favicon-stackoverflow.

on that question from earlier too
 
1:00 AM
> do or do not. there is no try.
 
@TheCoffeeCup Isn't this hypothetical/stub code?
 
1
A: Extracting the timestamp, minimum score, and maximum score from hundreds of arrays

BenCI'm a little unsure of why scoresDates starts with a 56-item array and the rest are 2-item arrays. Just to be sure, this is your date model, correct? Please let me know if I've totally misread things. scoresDates is [ [date, score, score, score...], [date, score], [date, score], ...

> As an example
how did you miss that
 
1:28 AM
@Quill @TheCoffeeCup Why was this question closed as broken code?
-2
Q: Two over-complicated UART interrupt handlers for SIM900 GSM module

LShaverUARTIntHandler0 interfaces through the MCU to the USB UART for debugging. UARTIntHandler1 interfaces to the SIM900 GSM module. The purpose of UARTIntHandler0 is very simple - grab an incoming character and push it to UART1 (the GSM module). UARTIntHandler1 is more complicated. In "talk mode,"...

 
void
UARTIntHandler0(void)
{
    // Get the interrupt status.
    ulStatus0 = ROM_UARTIntStatus(UART0_BASE, true);

    // Clear the asserted interrupts
    ROM_UARTIntClear(UART0_BASE, ulStatus0);

    // Loop while there are characters in the receive FIFO.
    while(ROM_UARTCharsAvail(UART0_BASE))
    {
        // Grab a character
        var = (unsigned char)ROM_UARTCharGetNonBlocking(UART0_BASE);

        // Hold it
        ptr[i] = var;

        // Mirror it to GSM
        ROM_UARTCharPutNonBlocking(UART1_BASE, ptr[i]);
where's i defined?
there's missing parts to the code
What is i? What is ptr? As presented, the code has many obvious bugs and cannot be reviewed. Voting to close, sorry. — vnp 6 hours ago
 
OK, I see.
 
Is it common in to use line-by-line comments like that?
 
I don't think it's more of a C practice; I think the OP is just putting a lot of comments.
 
Yeah, looks like a college student.
 
1:42 AM
I see. I notice C doesn't read quite as easily (to me (or maybe it's badly written C (which is definitely a possibility)))
 
@Mat'sMug I am working in a portable class library that doesn't allow me to create a WPF control. Can I create the presenter in a different project for UI's and reference it from there?
 
0
Q: My first React App - ToDo List

TriodeHey guys this is my first react app. Please let me know your thoughts on what can be improved. Also what would be the next things to learn about React. Thanks! Here is a working demo of it: https://dl.dropboxusercontent.com/u/92838694/React/index.html var ToDoContainer = React.createClass({...

 
1:55 AM
var task = this.props.tasks.map(function(task, index){
        return <li key={index} className={task.completed ? "complete" : "incomplete"} >
                    <input type="checkbox" checked={task.completed} onChange={that.handleCheck} data-id={task.id}/>
                    {task.task}
                </li>
});
WHAT !? Unquoted, raw HTML mixed in the middle of code!? What kind of sorcery is this React.JS thing!?
 
That is the JSX syntax/thing
 
Yeah, caught me too
 
It is very helpful for generating and manipulating generated DOM elements.
 
I can imagine!
 
Angular is similar, except you keep the html in a html file
Abby T. Miller on January 7, 2016
Welcome to the Stack Exchange Podcast episode #70! Today's podcast is brought to you by the BB-8 droid. Today your hosts are joined by developer Jason Punyon, whom you may remember from way back in Podcast #21. Punyon works out of balmy Buffalo, NY. (Here's the Buffalo sentence they talk about for a weirdly long time.)
> Can you tell me about your experience during the war?
lol
 
2:07 AM
It seems that your question is better suited to codereview.stackexchange.com rather than here. — Xotic750 9 secs ago
I'm voting to close this question as off-topic because it appears to be working fine and the OP is actually requesting a review, which seems more appropriate at codereview.stackexchange.comXotic750 14 secs ago
 
2:20 AM
 
0
Q: Array class to replace all iterator needs

some folkFollowing dreams, I have started learning Java for Game Programing purposes and, during code I figured out that Iterators such as Queue, Lists, Arraylists and what not are very common. I have written this code to replace any array and iterators based useage into one place. what do i expect from ...

 
2:43 AM
0
Q: simple neural network in python not working

zhirzhI am trying out the online book for neural networks, but cannot get past this problem: http://neuralnetworksanddeeplearning.com/chap2.html#problem_269962 I have implemented a basic neural network, with sigmoidal activation units and I am using full batch gradient descent. But my code "just doesn...

0
Q: Is this the most efficient way to handle basic operations for a programming language?

Ashwin GuptaI have written a set of functions to compute basic mathematical operations for my own java based programming language. First I tokenize input from the source code file and store it in a String array. For the mathematics, I simply read through the array looking for an operator (+, -, /, *) and if ...

 
@CaptainObvious off-topic for broken code
 
possible answer invalidation by LShaver on question by LShaver: codereview.stackexchange.com/posts/116094/revisions
 
0
Q: Two over-complicated UART interrupt handlers for SIM900 GSM module

LShaverUARTIntHandler0 interfaces to the USB UART for debugging. UARTIntHandler1 interfaces to the SIM900 GSM module. The purpose of UARTIntHandler0 is very simple - grab an incoming character and push it to UART1 (the GSM module). UARTIntHandler1 is more complicated. In "talk mode," it should allow...

This is good to reopen now
 
0
Q: Why do people make comments about Java null pointers?

1.21 gigawattsI saw this comical image recently comparing different languages to different types of guns. This is the one for Java: I'm wondering why they say that (about null pointers) and is the way I write code protect against that: // pseudo code public function getBitmapData(index:uint):BitmapData { ...

 
I just found that 6 people are following me on GitHub. Mat's Mug, Sir Python, Vogel612, and three people I don't know.
 
2:59 AM
I thought I was following you...
 
You are now.
I'm not following anyone. I follow specific projects I am interested in.
 
 
0
Q: `continue' not properly in loop on python, how do i fix this?

user94170i need help, i keeps saying continue not properly in loop,. while health > 0 and health2 > 0: Punch = random.randint(18,25) Magic = random.randint(10,35) Heal = random.randint(10,25) if pTurn == True: pMove = raw_input("\nPlease select a move:\n1. Punch (Deal damage between 18-25)\n2....

0
Q: how to make java game executable?

LandotheProgrammeri made a game in java, but i want to know how to make it executable. as in someone double clicking it and it running the code and starting the game. how can i do that? i have heard of some builders, but i forgot what they are called, and i remember trying them and they didn't work. also, i am on ...

 
i know the spaces are off but how is it broken? — user94170 1 min ago
did you not read what you've written?
@CaptainObvious off-topic
also kinda weird cause the question's code may be working, but the author is asking for help running the game
in JavaScript on Stack Overflow Chat, 52 mins ago, by Sterling Archer
http://imgur.com/gallery/2w9IS45
 
3:18 AM
@CaptainObvious wat
 
Spaces being off make it broken majorly. — Quill 8 mins ago
i know but lets just say i have the spaces correct how do i fix it? — user94170 51 secs ago
Really....
 
I guess they don't understand how Python works?
 
> PHP is like a hose, you usually plug one end into a car exhaust, and the other you stick in through a window and then you sit in the car and turn the engine on
> Lisp is a shiv which comes in many forms. Anyone who uses it is probably crazy and dangerous.
 
lol @ C++... I have nunchuks, I can relate ;)
 
0
Q: Open quantum system modelling

TanMathI have been working for a long time now on modelling an open quantum system using the Lindblad Equation. The Hamiltonian is the following: However, two other matrices are added to the Hamiltonian. One of them has all the diagonal terms equal to -33.3333i and everything else zero. Another is a ...

 
3:28 AM
It is off-topic to ask for help making it display the correct result. — Quill 10 secs ago
 
@Quill I'm curious, is there a specific reason you are linking your comments to Cap'n?
 
because you link the comment to the post
 
(less typing is a good reason)
Sorry, I meant the post comment bit, not the reason why you are replying. Like I said just curious
I must say, I love Java's System.out.format (or printf same thing)
 
oh, just cause some users just stick to chat and don't watch the main site
I'd rather posts get handled fast than askers to get pissed with slow resolution and walk away from potentially good posts
 
True
format() is almost as good as Groovy's string interpolations
(and I think C# has that now too - right?)
 
3:35 AM
Yeah, string.Format
 
Is that string interpolation in C#, or is it more similar to Java's out.format()?
(I realized they are all string interpolation, but the syntax is not quite the same)
 
Yeah, like this:
string.Format("<tag attribute=\"{0}\">{1}</tag>", attribute, value)
 
Ah so it's almost identical to Java... look at this:
//Java
System.out.format(
    "Hello %s. The number is %d and the float is %f." +
    "Do you have any questions, %s?",
    myName, myNum, myFloat, myName
);

//Groovy
print "Hello $myName. The number is $myNum and the float is $myFloat.\n" +
        "Do you have any questions, $myName?"""
(above assuming not using Groovy's multiline Strings)
 
You'll get to know this if you post this on Code ReviewTushar 51 secs ago
This would need more context before it's a good Code Review question. As in, a bit more context as to why you wrote it that way and what it does, and a better title. But if you do that, you are welcome to post it to Code Review for feedback on your working code. — Phrancis 10 secs ago
 
You gotta admit, it's sweet to be able to plug variables (and even expressions) right in the middle of strings
print "1 + 3 = $(1+3)."
 
Zak
3:48 AM
Monking @all
 
Hey there @Zak
 
0
Q: Refactoring an event listener on $(document).ready() and ajax requests

rrcdrIn my rails 4 app I have this event listener: $('.remove-tag-button').on('click', function () { $.ajax({ type: "POST", data: {id: <%= @item.id %>, tag: $(this).data("tag-name")}, url: "/remove_tag" }); }); in three places and I'm wondering if there's a way to refact...

 
monking @zak
 
Zak
It really is. Up at 4am again :(
 
@Phrancis and then JavaScript is like
var string = `bobsdovb${otherstring}`
 
4:03 AM
Ah yes, nice
Is that vanilla JS @Quill?
 
ES6, yeah
 
So about 5% supported?
 
probably less ;-;
> I don't "check in or commit code", but I put code into production somewhat frequently
LOL
 
Eh I can somewhat relate to that
On my team our devs have a dedicated person that checks code in for them, it can make it easier to manage conflicts and such, and make sure the right code gets deployed to the right places
But, double-meaning, it can also mean there is no VCS
 
@Phrancis C# can do variables with string interpolation.
$"{variable}" will print the value of variable.
 
4:16 AM
> To retrieve your user profile link, please visit stackoverflow.com, log in and click your profile picture in the top bar, copy the URL, and paste above.
... wow
 
Seems like a simple enough task, @Quill ... surveymonkey doesn't have access to SO, so that is about as good as it gets
 
just that they have to say it, I guess
 
Never underestimate how inexperienced your users are.
 
well... I'm locked out of my local corporate cms, I don't know how to reset it either...
fun times
the staff table is named UserAccount come on
 
4:38 AM
@Quill That only has staff, or also other accounts? (customer etc.)
 
only staff
 
Are there any Users that are not staff?
 
turned off staff members but there's a IsActive field for that
Quick question, if a senior developer takes your name (puts theirs in) out of the reporter field on Jira, is that weird, or should I not really care?
 
Sounds common, I wouldn't worry about it
Jira might use that field for something you don't really need to care about. The only thing I would check on, if you need to, is if you own this incident (i.e. "care about" in the way a PM does) it's possible it won't send you updates via email
Anything beyond that is probably not worth your time
Closing tabs is fun. I only have 9 left open. <-- @skiwi
 
I'm set to get emails about every change on all the projects I'm in
and I don't think so, I think he just mistook the field, actually
 
4:53 AM
0
Q: string compression implementation in C

CodeCrackI implemented basic string compression algorithm that uses the counts of repeated characters. For example: the string aabcccccaaa would become a2blc5a3. What do you think about this, is there a better way to do this? #include<stdio.h> #include<stdlib.h> #include<string.h> char* compressString(c...

 
@Quill Even developers make user errors, sometimes :)
 
especially if you don't know Jira
 
I've only used a very old version of Jira, the new ones look much nicer
 
I'm trying to prepare myself for an interview tomorrow, so I'm taking some technical assessment quizes
And some of the answers are just wrong
 
@syb0rg Can you explain why they are wrong? If you can (and they were relevant to their code base) you'd make a fantastic candidate ... If the interviewer knows his/her stuff
 
4:58 AM
@Phrancis They aren't from the company, I just found them online
 
as long as they can take constructive criticism
 
I thought of a fantastic language for professors - Comments. It parses and executes the comments.
 
"Not all reserved words are written in lowercase. TRUE or FALSE?" Given answer is false
 
@Quill That's the "why" part
 
It is usually written as a polyglot C#/Java/C++ program.
 
4:59 AM
_Bool popped in my head almost immediately
But I can't find proof that it's a reserved word
 
@syb0rg Which language is this for? In C#, the reserved keywords are all lowercase AFAIR.
 
In the newer standards (C11), there is _Thread_local
@Hosch250 C
 
OK.
 
They have _UnderscoreNames as part of the standards??
 
@syb0rg Email the website and tell them they're wrong, then
 
5:00 AM
@Phrancis They didn't want to break old code when adding new reserved words to the C11 standard
 
Probably the smarter decision from a business standpoint eh...
 
Woosh
 
Nobody wants to spend a whole bunch of time refactoring a code base because the C standard added a new keyword which happens to conflict with some names of things
 
@Quill What is going on?
Explain to me!
 
lol
 
5:04 AM
YouTube comments is where communication goes to die
 
I should also mention that you could include new standard headers so that _Thread_local would become thread_local
Obviously legacy code wouldn't include these headers and everyone is fine
 
It also occasionally replies with 'Comment of the year', 'Are you for real', and 'I'm taking a screenshot so I can remember this moment forever'.
3
 
5:17 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 7 mins ago, by Andrew T.
Do you know that your question is linked in the official Android documentation? — rekire Dec 17 '14 at 10:55
 
10 hours ago, by Phrancis
UGH XML, the bane of my existence.
 
funny though, I guess
 
5:36 AM
0
Q: D3 Map Visualization with tooltip and graph

user2006018I would love if someone had any feedback on how to optimize my code, suggest better color schemes, and improve my table. I created python scrapers to get the data from the CDC and menuism to get the locations for each state. I would like someone to review my javascript code and overall design/i...

0
Q: Oracle SQL- Table1 records not in Table2

DeepanI have two tables Left and Right. Left has two Columns "Request_id" and "File_Id". Right has three columns "Request_id", "File_Id" and "Version_No". I would like a query to filter only records which are present in "Right" table and not in "Left" table. Below is the sql query I am using. Is ther...

 
Another incorrect answer: "Can I use “int” data type to store the value 32768? Why?"
Given answer is no
The int data type isn't explicitly defined by C standards
If the question was more explicit, such as including "safely on all systems" then I believe the answer would be no
 
0
Q: 'continue' not properly in loop

user94170while health > 0 and health2 > 0: Punch = random.randint(18,25) Magic = random.randint(10,35) Heal = random.randint(10,25) miss = False move_miss = random.randint(1,5) # 20% of missing if move_miss == 1: miss = True else: miss = False if miss: player_move = 0 # player misses and de...

 
6:00 AM
@CaptainObvious Wow. Some people…
@CaptainObvious That code doesn't do what it says, I think. Am I reading that right, @Phrancis?
 
@200_success eeeyup
 
0
Q: Finding if there exists an input for a given automata for which no matter what the starting state is, final state would be same everytime

h_tI am solving a puzzle (Finding if there exists an input for a given automata for which no matter what the starting state is, final state would be same everytime) and have written following python code. A few testcases are written in check method in the code. For these cases program is running fai...

 
I'm finding it more productive to listen to podcasts while working than music
 
@200_success I think r1.FILE_ID IS NULL is inverse to what they want to do
But at the same time, and this^^ could be wrong, it does sound like the query is doing what they expect it to
 
possible answer invalidation by CodeCrack on question by CodeCrack: codereview.stackexchange.com/posts/116194/revisions
 
6:21 AM
@200_success I found a solution for it, but that would still be off-topic here
select r1.*
from
  Left as l1
  inner join as Right r1
    on l1.REQUEST_ID = r1.REQUEST_ID
    and l1.FILE_ID != r1.FILE_ID
    --and r1.FILE_ID IS NULL -- this is implied and INNER JOIN will take care of it
where
    r1.REQUEST_ID = 47213;
Also I have an error in the first join
should be inner join Right as r1
 
0
Q: guide me to access data from SQL sever using web service

ParryI couldn't access the data from external database using web service, if possible direct me with sample code to perform the task

 
This might be more appropriate for codereview.stackexchange.comOnots 41 secs ago
 
@CaptainObvious off-topic
 
This may be acceptable for Code Review as long as (A) the code works (B) the code is not hypothetical or unfinished — Quill 47 secs ago
 
OK, TTGTB for me I think
 
6:48 AM
monking @all
 
7:29 AM
0
Q: Extra Fun Tile Based Puzzle Game Frame Based Decision Making

user3995789This is a tile based game, It has a circular dependency and everything gets undefined. levels.js import roles from './roles'; const roles = { role1: { name: 'role1', nextDecision: roles.decisionA }, role2: { name: 'role2', nextDecision: roles.decisionB } }; const makeR...

 
If you have a problem with the above code, explain it. If you want a review of your code, then Code Review is more appropriate. — Holt 43 secs ago
 
8:30 AM
Monking
 
monking
 
@Phrancis About 50%. Still far too low to use without transpiling
It's the same story as most es6 features, though: supported by firefox and chrome, not by IE, very few mobile browsers curerntly
 
9:00 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Reduce repetition in SCSS for panels of various colors
 
Could anybody know why this question is being upvoted?:
3
Q: Open quantum system modelling

TanMathI have been working for a long time now on modelling an open quantum system using the Lindblad Equation. The Hamiltonian is the following: However, two other matrices are added to the Hamiltonian. One of them has all the diagonal terms equal to -33.3333i and everything else zero. Another is a ...

It is closed!
Could it be reopened or something?
And does anybody know the answer to the question, more importantly?
 
It's probably being (incorrectly) upvoted because it looks like an interesting question.
It will not be re-opened on CodeReview as broken code is explicitly off-topic here.
Monking, @skiwi
 
Monking @DanPantry
 
@DanPantry thanks for the downvote!
 
@TanMath It's not personal. I do think the question is interesting (and would like to see it answered), however it shouldn't be on the front page taking up space from on-topic questions.
 
9:07 AM
@DanPantry no, I am serious... I do not care about rep for a place I probably will never come again to... If it cannot be answered, there is no point upvoting it...
 
> Note, this code runs, but does not produce the correct result and displays an incorrect result. So now, I want to work on fixing the code so I want to make it run much faster!
Don't you need to fix it first before caring about how fast it runs?
 
+1 @skiwi
 
@skiwi no...Am I supposed to wait 4 hours to check if the 10 characters I changed made a difference??
 
@TanMath You could always scale the problem down so it does not take 4 hours.
 
@DanPantry how? How will I get the desired effect?
it is a special system and I do not know how to reproduce the problem with a smaller system
 
9:10 AM
@TanMath Well, I could make a program that calculates factorials. I could let it run for hours calculating the factorial of 1 billion to ensure it works, but I could also let it calculate 10! which would take significantly less time and would still prove the code works.
 
9:21 AM
The periodic table of elements was purely used as a "I cant think what else to do and I'm just seeing if I can do it" kinda thing... — Sam Swift 웃 1 min ago
@Phrancis ^ LOL
 
After some thought, I decided to choose this as the answer. The question received 2 well-written, well-reasoned answers as well as an intelligent comment from a world-renowned expert. I wanted an answer I could use in code reviews to catch a 2x slowdown pre-commit, but maybe that is not possible. I chose this answer because apparently the best approach to replacing loops with streams in performance-sensitive code is to do it in an incremental way which can be easily backed out if a performance issue is detected by automated end-to-end tests. — aro_tech 14 secs ago
 
Zak
9:44 AM
It's interesting that MS are ending support for Windows 10 a mere 3 years after it was released. But then again I guess they want to get people off of IE entirely and onto edge in the near future.
 
> Windows 10
> a mere 3 years after it was released
don't you mean windows 8? @Zak
 
@Zak I don't think you had your coffee yet :P
Looks to me like he means IE 10 or IE 11 ^^
 
I think he means windows 8 which came with IE10/11; only Windows 10 supports Edge.
And Edge is actually an okay browser
Not to mention ie10+ie11 don't appear to be getting any more features and none of them support any of the es2015 or newer css features.
 
@DanPantry Luckily I don't think there are devs that think about supporting es2015 on IE
 
No one wants to support es2015 on IE, but IE is still a large portion of the market share. Eliminating browsers that don't support es2015 will mean we can stop using stuff like Babel or whatnot for every day code. @skiwi
Not to mention it's not just es2015. There are some css features or html5 features that ie doesn't support, for example, flexbox.
IE10/11 don't support the newest version of flexbox (only the old version of the spec), but Bootstrap 4 (set to be released this year) will only use flexbox for its grid system.
 
9:50 AM
Can we ever stoop using Babel? Gotta support mobiles
@DanPantry That's rather interesting
 
@skiwi for all intents and purposes, some of the flexbox features are supported by ie10/11 but there are interesting caveats.
@skiwi Probably not, but the sooner we can move towards global ES2015 adoption the better.
 
Is it just me or is the new mobile chat out?
 
@Vogel612 I haven't used it yet... :(
 
God, mentions look nice
And you can finally star from mobile
 
@Vogel612 Punctuation it matters
I was trying to figure out what a God mention meant, maybe I am the one not being awake yet
 
9:53 AM
@skiwi better?
 
@Vogel612 This is the only thing that matters to me. Starring is the lifeblood of 2nd monitor.
 
Zak
I was talking about IE 10.
Evidently, I need more coffee
 
Comparisons between IE10 and Edge 13 Btw: caniuse.com/#compare=ie+10,edge+13
 
Edge... has a number?
 
There's quite a large swath of features not supported by IE10 like CSS.supports which is super useful
@skiwi Yes, Edge has a version number.
The current version is Edge 13.
Edge has the same methodology for updates that Windows has: It still has versions, but it's updated without asking the user and automatically
 
Zak
9:56 AM
Edge version numbers just continue right where IE leaves off. IE 11 --> Edge 12 etc.
 
@Vogel612 I don't seem to have it yet, do you need to summon special powers for it?
 
Ah okay, you probably need to do a special summons
 
You have to sacrifice a lamb to Jon Skeet
 
To balpha actually
 
They can share ;-)
 
10:10 AM
0
Q: Gerrit permission to review a specific path

liranGIm currently working on a big project with more then one team. Lets say in the project there are some modules that each team working on. In addition we are using gerrit for sometime now and there is something i couldn't find out. My question is the following: Is there a way to tell Gerrit tha...

 
@StackOverflow false alarm
 
@DanPantry you shouldn't remove that tag
it's correctly used there
we're just "interested" in the incorrect use-case
 
@Vogel612 woops
added it back
that's confusing
Thanks for correcting my ignorance
 
Why would you do this? It's only beneficial to get an external perspective to your code. You cannot reasonably deny teams working on the same project the read-access to the codebase of the project. That only slows them down, and again: For a codereview a pair of eyes not used to the "normal madness" is almost always a good idea — Vogel612 11 secs ago
 
@Quill No tracking will be available :\
 
10:18 AM
@JNat :(
 
0
Q: How to find a word in the string

Bernardo I want to find a word in the string and replace it with new one. If the first letter in the word is upper case, the function should replace it with upper case or vice versa. Is there a better solution than this. function myReplace(str, before, after) { var arr = str.split(" "); if(arr.in...

0
Q: How to have better readability when using long if/else statements?

GibboKI need to create an object based on some properties of another given object, in my example setRules, add properties to object status. Considering that the cases to be handled will increase increase I would like to figure out how to enhance readability. I would like to know: Could a switch sta...

 
@CaptainObvious use the command pattern w/ maps
 
@JNat could you send us a mail along the lines of "Swag left the warehouse" though?
@CaptainObvious How to have better readability information in the title?
 
@Vogel612 wait until you see the code itself
 
@DanPantry ~facedesk
it's really not even remotely difficult to get to the command pattern from there
 
10:21 AM
It looks like he has two 'versions' of the same code in his question
 
they even called the damn thing cmd
@DanPantry yeap...
 
@Vogel612 thanks, I was already doing that
(but you did it better than I would have)
 
Monking all
 
@Vogel612 Sure, will do
 
Wonderful, thanks :)
 
10:30 AM
Monking all
 
Monking @SuperBiasedMan @Mast
 
@JNat thanks for letting us know
 
I'm not going to be around today because we are going to Duluth to see a rare gull.
 
It's nearly a year since I started working where I work now. Awesome. :-)
 
Same! I don't remember the exact day but it was around now.
I remember cause of the SO developer survey haha.
 
10:37 AM
@Hosch250 Didn't that town unexpectedly get hit by a tornado not too long ago?
 
Jan 21st here
 
I think I was near the end of the month...
 
@Mast Duluth? I don't think so.
 
10:55 AM
We are using 2 steps of code review: — liranG 24 secs ago
 
0
A: Array class to replace all iterator needs

chillworldIt's a kind of default review, without going into the performance or implementation. Naming You really like short naming for variable : for(int i = 0; i < size; i++){ int ii = r.nextInt(size); int iii = r.nextInt(size); T temp = items[ii]; items[ii] = items[iii]; items[iii]...

and now TTGH
 
Zak
@Duga Sounds a lot like they're trying to implement a system that could be done with a simple email/policy meeting.
 
11:24 AM
> visited 800 days, 800 consecutive
5
 
Nice ^^
 
I've visited for 387 consecutive days.
 
I've visited for like 4. I'm trying :(
 
And I manually log in most days, I don't have the system wake up and log me in.
 
I cannot wait until Node supports rest parameters, makes things so much easier..
function execute() {
  const args = [].slice.call(arguments, 0, arguments.length)
  const segments = args[0]
  const parameters = args.slice(1, args.length)
  return segments.reduce(function reduceQuerySegment(previous, next, index) {
    const nextArgument = parameters[index - 1]
    return previous + escape(nextArgument) + next
  })
}
vs
function execute(segments, ...parameters) {
  return segments.reduce(function reduceQuery(previous, next, index) {
    const nextArgument = parameters[index - 1]
    return previous + escape(nextArgument) + next
  })
}
 
11:28 AM
I guess it doesn't show, but I have exactly 13,000 rep.
 
It shows if you go on the profile itself.
 
Obviously, where do you think I got that information from?
Gets random upvote on really old question
Now, I would I have preferred a vote on my newest question.
 
I was taught that you should never bicycle on an empty stomach; you should bicycle on a cycle path. — Eric Lippert 21 hours ago
2
 
@skiwi *golfclap*
 
That's what you put a programmer in the real world :P
 
11:32 AM
@skiwi I've biked over 30km on an empty stomach often enough. OP is simply too concerned...
 
Pimping:
0
A: Let's pick t-shirt tagline!

rolflDoes this code make my ass look fat? (source here

 
2
Q: Visualizing Brainf_ck interpreter in ClojureScript

ReefersleepI have written a working Brainfuck interpreter using ClojureScript, reagent, core.async and dommy. I am not very satisfied with the code, however, in particular the central part of the code - the interpreting function, step. It is a pages-long mess of nested conditionals. I would like to simplify...

How... is this maintainable?
 
> brainfuck
> maintainable
 
More talking about the Clojure part
 
I don't understand why people still write Clojure professionally.
 
11:40 AM
They just need a sense of clojure.
 
So, @DanPantry, quick question, how does one add vertical padding between HTML elements? padding-top isn't cutting it and I suspect I should abuse jQuery for this anyway.
Adding a well is too crude.
I'd say I get .outerHeight and add a little to it.
 
11:56 AM
@Mast margin-top or padding-top are basically the only 'nice' ways.
wouldn't recommend using javascript to manage layout unless it's a last resort.
 
Right.
So keep it in the CSS, even in a responsive design.
 
Yes. You can use media queries for responsiveness
* {
  color: red;
  @media all and (min-width: 640px) {
    color: blue;
  }
}
(I think nested syntax will only work in SCSS or similar, though()
 
Right, I haven't touched SCSS yet.
 
In which case it just looks like this:
* {
  color: red;
}
@media all and (min-width: 640px) {
  * {
    color: blue;
  }
}
 
I have some success with modifying width in CSS, but top padding and height hasn't worked out well so far.
 

« first day (979 days earlier)      last day (3038 days later) »