« first day (702 days earlier)      last day (1955 days later) » 

12:00 AM
There are 1298 unanswered questions
12:24 AM
@Alfe Asking for improvements on existing code can make for very on-topic questions on Code Review, as long as it's not "I want to add feature X". In fact, questions as blanketed as "Here's my code, any suggestions?" aren't really that great on Code Review. — nhgrif 1 min ago
@JeroenVannevel Objective-C has done perfectly fine without method overloads for 32 years. Of course, there is implicit casting between lots of the primitive types though. You don't need a specific method for int versus long etc.
Congrats on the steward badge on April 1st, @Jamal, your accomplishment got lost in the noise ;-)
12:47 AM
Thanks. :-)
(I was kinda afraid that SE was going to swipe it from me, say "April Fools!", then give it back.)
Have you seen the new-profile hack that's available for those "in the know" ?
@Duga I haven't seen these posts yet
@rolfl that is cool
where does that pop up from
If you go to your meta.stackexchange profile ......
then see this:
At the bottom right, there, there is a 'settings' icon.....
click that, and you see your badge progress.....
the logic that populates that screen is enabled on all sites, but the display is not.
The link above is the logic.....
when the new profiles get rolled out to CR, then the need will be gone.
1:15 AM
Q: Webpage quiz, looking for ways to optimize the code

AtomParticularly on the CSS page, in the #question_list id, you'll see I've put a transparent border. This is obviously pointless, but without that border, my footer moves up and down when the proceeding questions come in, due to their size. Any suggestions on what I can do to remove that border and ...

Q: Why is "method that returns exception" not recommended?

ajbRecently, in a code review, my code included a method whose return type was some subclass of Exception, and a reviewer flagged it as being "not a recommended pattern". The situation was this: I had code that caught some exceptions and mapped them to other exceptions, maybe something like try { ...

Q: Are trivial refactorings like this worth it

Kris WelshI was looking over my code the other day and I couldn't decide whether a refactoring I had made was worth it. Here's the standard version: (psuedo-code) random.boolean() ? _pane1.repair() : _pane2.repair(); And the refactoring: randomBoolean() ? repair(_pane1) : repair(_pane2); function ran...

1:32 AM
sometimes I miss the Mouses with the Balls in them....
I have traps for those.
2:03 AM
Q: This is a class that make asynchronous http requests

MarcelI made this function to act sort of like jQuery's $.ajax. I intend to use it in small projects where I do not use jQuery (I don't want to load a whole framework just to facilitate http requests). "use strict"; Object.prototype.populate = function(obj) { for(var i in this){ if(this.h...

2:18 AM
Q: Find non duplicate Triangle Triplets from a list of given numbers- version 3

SteephenIt is a continuation of my previous question Find non duplicateTriangle Triplets from a list of given numbers. After I realized triplet structure using less space than std:vector and there is a simple way to remove duplicates from the triplets list by modifying loops index I rewrote the code agai...

Q: Find non duplicate Triangle Triplets from a list of given numbers- version 3

SteephenIt is a continuation of my previous question Find non duplicateTriangle Triplets from a list of given numbers. After I realized triplet structure using less space than std:vector and there is a simple way to remove duplicates from the triplets list by modifying loops index I rewrote the code agai...

Q: Given bit strings, perform a bitwise addition

JavaDeveloperLooking for code-review, optimizations and best practices. This code has been attributed to to 'geeksforgeeks.com'. Please verify if space complexity is O(n) where n is number of bits, and aux complexity is O(1), since no temporary space was needed. Whatever space was needed was used for return v...

2:35 AM
JDQ!!!! ^^^
Probably more appropriate for the code review stack exchange. — Dave Newton 57 secs ago
2:50 AM
Q: Type Name or Alias via Reflection for TT Code Generation

AlexI was working on some TT code generation to get rid of mundane C# codings in VS2013 Express Edition, and after researching online, created the following helper methods to facilitate Type declarations. I am able to use it successfully in my code generation but wonders if they can be improved furt...

Q: React app that receives data via an AJAX requests, display the data and makes it searchable

01bitI have recently started using React and wish to know if my code adheres to the React coding style, whether I am following the sane approach towards solving any problem and is there any way I can make the code better. Thanks in advance :) var React = require('react'); var Bootstrap = require('rea...

3:18 AM
Q: Simple Ruby directory navigator functions refactoring

Soviet_JesusIn the process of writing scripts to work with CSVs and other files of the like I found myself in the need of a way to navigate and select files for various purposes. I wrote the following function for one of the scripts I needed to finish quickly and now I'm trying to get it into a more reusable...

3:40 AM
Q: Matlab quadractic function with graph

Wednesday FadesI'm very new to MatLab and I am having some difficulty creating the code and just understanding what to put where. I got my quadratic formula to run and loop(Ex 4.2), but now I've been asked to have a function to plot the graph of the formula. These are my instructions: Meet all the requirement...

4:37 AM
Q: Triangle java program

user69698Write a java program to identify a triangle and calculate its area. There are 3 input numbers from the KB. for the 3 sides a,b,c of a triangle. Your program should to identify the type(right angle, equilateral, isosceles or regular) and calculate the area. A=sqrtp(p-1)(p-b)*(p-c) , where p = (a+b...

5:02 AM
Another code review note: You shouldn't call ballMove() inside a function named randomColor() because moving the ball has nothing to do with what the function says it does. Same for ballPosition() - you should set or return the ball position, not call randomColor() or add the balls object to the parent. Those functions should be handled by the function calling ballPosition(). — All about that base 2 1 min ago
Impossible to answer in an objective way. You tried to provide detail and explain yourself, but the questionS are subjective and broad. I can't recommend code review, either, because I don't think they get into large-scale reviews of pattern implementation. Check out their post guidelines. This isn't a Stack Overflow question, though. FWIW, MVC in the true sense is pretty much not possible in PHP. You're building an approximation. The most important things are having a coherent structure, separated concerns, and code you can test. You seem to be on that path. For more help, break it down. — Chris Baker 1 min ago
5:34 AM
mahesh, question is not clear for stackoverflow. may be you can left your code codereview.stackexchange.com and follow responses. — Nuri YILMAZ 1 min ago
1 hour later…
6:59 AM
Q: Json Special Characters Single Code

user3756214when json posted to server for saving data error occur due to Single code in string.Error is ProductDesc String Thanks in Advance. "[{ TransCode:'SRN-9990', ItemDetail:'10586', PostedDate:'25/02/2015', Rate:'320', ProductCode:'01-001-01927', ProductDesc:'ROVA 20MG TAB 10'S'',SevicePrice:'320',Ip...

7:21 AM
Q: Sequence generation problem - Fibonacci

overexchangeBelow is the representation and user interface fib_sequence for generating fibonacci sequence: empty_rlist = None #Representation - start #Constructor def rlist(first, rest): return (first, rest) #Selector def first(s): return s[0] def rest(s): return s[1] #Representation - end d...

@Jamal give me 2 mins, sorry for the inconvenience
thank you
7:50 AM
Q: Is my code fairly error-free? How can I better it?

GrendanTo write a Java class that reads through a text file of drawing commands and draws the appropriate shapes onto JFrames, I have input instructions as follows: FRAME width height // sets up a new frame with given width and height (both integers) COLOR red green blue // sets the current “pen color”...

Q: AutoComplete in a Multi column Combo Box with custom columns

KhanIn Visual Studio 2012, I have a MultiColumn combo box in WinForms App. I have two columns 'Col_1' and 'Col_2'. 'Col_1' is the display member for combo box. I have set the auto complete property on list items. When I search a keyword in text property of the combo box, it only displays the value ma...

Q: Project Euler 22 in Java : sum of name scores

Bob SuhI did not handle with sorting(but should not be a problem). When I compile my code, I get 850081394 for answer. The correct answer should be 871198282. I calculate first three names and it seems right. I wonder which part is wrong. https://projecteuler.net/problem=22 import java.io.*; import j...

Q: Getting App to start after bootup

user3041058Ok my aim is to get an app to run after the phone reboots, Write the time it has booted to a file in memory Finally Close the app I tried using a background service and boot receiver as shown in this tutorial http://www.jjoe64.com/2011/06/autostart-service-on-device-boot.html My manifest looks ...

1 hour later…
9:13 AM
Q: Applying DRY concepts to my python code

JuanvulcanoWho can make this better? My code is some bytes larger than it's supposed to be. The Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21... This is not the only interesting integer sequence however; there are many various sequen...

9:59 AM
Q: Class Object to create objects of type Object, in a dynamic way, with magic methods

Ismael MiguelI have a project in my mind for quite some time, and it requires me to create dynamic objects. Usually, casting an array to object does the trick (e.g.: (object)array('test'=>5)). But sometimes, we still want the magic methods to fire up. For that, I have developed a class. It supports the ma...

10:12 AM
Q: Nested ternary return vs switch?

Hi-AngelI've seen everybody claims the nested ternary to be an evil even when an operation couldn't be written with switch-case; and here's even more, my code could be easily written with switch-case statement. /// <summary> /// Control sequence character /// </summary> private readonly string CSI = "\u...

Q: Automatic flowchart generator

CaridorcI wanted to see graphically what my programme was doing so I wrote this automatic flowchart generator: class Object def log(previous_method) if not DEBUGGING return end repr = if self.class == Enumerator then self.to_a else self end if [Array, Str...

10:31 AM
Someone decided to serial downvote me on Stack Overflow, probably because of my opinions on what of two different metas.
10:48 AM
Does anyone here know Pushbullet?
I use it, yes
I'm tempted to create my own channel and develop something for it, but I'm out of ideas for what would be useful :D
You can develop for pushbullet?
I just use it to get my phone's notifications on my desktop and to quickly share images between phone and computers
Yep, you can send notifications yourself
(I use it for the notification sync aswell of course)
This problem is... counter-intuitive
The Monty Hall problem is a brain teaser, in the form of a probability puzzle (Gruber, Krauss and others), loosely based on the American television game show Let's Make a Deal and named after its original host, Monty Hall. The problem was originally posed in a letter by Steve Selvin to the American Statistician in 1975 (Selvin 1975a), (Selvin 1975b). It became famous as a question from a reader's letter quoted in Marilyn vos Savant's "Ask Marilyn" column in Parade magazine in 1990 (vos Savant 1990a): Suppose you're on a game show, and you're given the choice of three doors: Behind one door is...
Always stick to your initial guess, I thought?
10:56 AM
Always switch.
No, you should always switch
I still can't quite grasp it, at least I'll remember it forever ;)
@skiwi Imagine 100 doors, picking one, then Monty removes all but 2 doors. One of those doors has the good prize behind it. Now can you understand why you need to switch?
^^ that
Switch, damnit!
11:03 AM
Numberphile has a nice video explaining it
@nhgrif sorry but I have to reopen this post, since the one in Code Review has been very quiet. — Dang Manh Truong 51 secs ago
Mythbusters tested it in an episode.
@Duga 18 hours ago? seriouslyß?
@Vogel612 No, that comment was just posted!
I know, but the so-question is from 18 hours ago
11:05 AM
Don't mix me up with @CaptainObvious!
like the CR question
@Duga don't worry ;)
Q: Strongly connected components, component graph, semiconnected graph and new graph from SCCs

Dang Manh TruongI have written a program in C to do the following: Read a matrix (in file format, first line you have the size, then next are the entries). This is done by the "input" function. Find the strongly connected components using the kosaraju algorithm (the one that uses the transpose). Done by the "...

exactly that one..
The SO question needs to be reclosed.
I still need to read more on it, I still think it's counter-intuitive
11:09 AM
I can't vote because I already voted.
it was never closed
I think his delete wiped my close vote.
He deleted the question.
@DangManhTruong your codereview question is a verbatim crosspost of this one. Additionally your code is rather much and the problem itself isn't an easy one. This increases the time required to properly review your code. Additionally it's holiday and that means not many people are around to give a review. Have some more patience ;) — Vogel612 1 min ago
I guess we are lucky he even commented at all when he un deleted.
dafuq?? why is this question almost closed as pseudocode?
11:14 AM
This sort of question isn't going to get a good answer quickly no matter where it is posted. But with that said, you have double posted it which isn't okay, and it's more on topic at Code Review. — nhgrif 1 min ago
Is it being closed as pseudo code, or as asking for explanation?
maybe the latter...
Sometimes comments encourage me to downvote questions.
@nhgrif this is just in case the one in Code Review doesn't have any answer over time, if it does I will delete this one, if it doesn't maybe i will delete both :3 — Dang Manh Truong 1 min ago
Should we close the question here as it is cross-posted and the OP insists it be open on SO?
11:17 AM
meh. as what?
@nhgrif or flag the CR and/or SO post for moderator attention?
If, then I'd flag SO post..
@Vogel612 I guess it is because "This code is a Java adaptation of code on geeksforgeeks.org", but I don't think it should be closed for not being JDQ's original code. I see nothing wrong with that question, really.
It needs to be coded at one place or another as an exact cross-post.
neither do I...
11:19 AM
@Vogel612 I know that is all the more reason why it should be tolerated here :( . BTW, holiday? Not where I live :( — Dang Manh Truong 6 mins ago
^^ moar downvote reasons.
@Vogel612 I voted to close that one because the original post made it seem like the code was directly from another geeksforgeeks.org. I went there to look and the code was in a different language, but I thought it was similar enough to warrant a close vote. But I guess I was wrong so I retracted my vote.
Is it asking for an explanation of the code?
I haven't voted on it.
It asked what the space complexity was.
It sounds like you want to improve your PHP script, but we'd need to see it in order to make suggestions. If you can offer some sample errors we might be able to suggest how to fix them (and so the question will be on-topic). If you want general suggestions then the Code Review site might be better, but I don't know what's on topic there. — halfer 1 min ago
11:26 AM
That's not really a review.
it's standard JDQ...
"Me wantz reviewz on all aspects and can someone plz tell me I can actually assess time and space-complexity"
Q: Left Shifting and array of ints

AnirudhThe problem I am referring to is here So Basically it's about shifting an array of ints to left and replacing the lost first int in the start of the array with the one at the last on the right.: shiftLeft({6, 2, 5, 3}) → {2, 5, 3, 6} shiftLeft({1, 2}) → {2, 1} shiftLeft({1}) → {1} Please fee...

@nhgrif He is also however, of course, Looking for code-review, optimizations and best practices.
@JS1 It almost feels like I am stealing reputation that you should have got, you could have written an answer to the switch-vs-ternary question :)
11:44 AM
Q: Block multiple request from a same IP in Yii

shivakrsthaHow to handle multiple request from a user/IP/client? I am using Yii PHP framework, and want to write a code which should detect such activities. I got serious issue about multiple request by a client. Finally my Apache server frequently crashed, so I want to block such user who send more than ...

It doesn't quite match SO format. You'd better ask this question on codereview.stackexchange.comphts 19 secs ago
@SimonAndréForsberg ???
@phts that is not correct. This code is not working as intended and thus off-topic for codereview. Please read: meta.stackoverflow.com/questions/253975/… . Thanks! — Vogel612 1 min ago
@RubberDuck Sorry, couldn't help myself. (or didn't you see the "Update here" link?)
12:23 PM
@SimonAndréForsberg LOL. Now I did.
Isn't Open Office defunct now though?
I thought development was being focused on LibreOffice now?
TBH it's been a few years since I've looked at either.
@RubberDuck It is? I have no idea. I still use Open Office. Never heard of LibreOffice before.
I love how my machine is basically bricked while its installing about 20 different security updates this morning.
LibreOffice is a free and open source office suite, developed by The Document Foundation. It was forked from OpenOffice.org in 2010, which was an open-sourced version of the earlier StarOffice. The LibreOffice suite comprises programs to do word processing, spreadsheets, slideshows, diagrams and drawings, maintain databases, and compose mathematical formulae. LibreOffice uses the international ISO/IEC standard OpenDocument file format as its native format to save documents for all of its applications (as do its OpenOffice.org cousins Apache OpenOffice and NeoOffice). The OpenDocument file format...
> Oracle announced in April 2011 that it was ending its development of OpenOffice.org and would lay off the majority of its paid developers.[80] In June 2011, Oracle announced[81] that it would donate the OpenOffice.org code and trademark to the Apache Software Foundation, where the project was accepted for a project incubation process within the foundation, thus becoming Apache OpenOffice.
And Apache did not continue the development?
I don't know. Apache may have.
Looks like they put out a new release every now and then. =) openoffice.apache.org
12:47 PM
> (p.s. I don't know Java, the sintax may be wrong...)
The sintax is exorbitant
yes, definitely..
@rolfl LOL
Monday Monking to all ;-)
Greetings, Programs.
@Donald.McLean Greetings, User
12:57 PM
So, hey... @rolfl @Donald.McLean you guys have been around. Seen some things. Either of you ever worked with Serena Dimensions?
a.k.a. PVCS
Monking btw
@RubberDuck I have, a long rime ago
VB code at the time.
very much last century
@rolfl Is it as bad as the internet says it is?
I'm a bit skeptical of a system that locks files and has no merging ability.
@RubberDuck I've worked with quite a few technologies, but never heard of Serena Dimensions.
I'm trying to figure out how hard I need to fight for what I want here I guess.
@RubberDuck - No idea if it is as bad as the net says it is.
1:08 PM
I think it comes down to any source control is better than none, but what I've been reading has me thinking that might not be strictly true.
At the time, it was the first VCS that integrated well with issue tracking, and reporting.
At the time it was a step up. Hopefully they have kept up to date with the trends.
It doesn't seem they have, but I won't really know until I get my hands on it.
I was just wondering if anyone I actually knew had any horror stories.
Doesn't sound like you had an awful experience with it.
Which gives me hope.
I've only used two VCS technologies at work. CVS and whatever it is that works with Trac.
@RubberDuck At the time, any structure seemed like an imposition on my creativity...
nowdays I prefer to have the structure ;-)
Ahhh, to be young, and free ... and stupid.
1:12 PM
That ^^^
I'm just worried about bringing in too much over head. Too much structure.
So much of what we do is at the drop of a hat. Get it done yesterday.
@RubberDuck - prepare yourself to have a less-than-ideal setup with it.
Better than nothing I guess. Thanks for sharing.
That's exactly what I'm worried about...
but, note that the reasons for keeping it are often more complex than just your feelings
But why set up something brand new on antiquated VCS?
That bothers me.
1:15 PM
Specifically, often, the history stored in it, or the automated build process that currently works, etc. are significant investments....
Those don't exist.
Not yet.
I went asking for a VCS, (git) and they came back to me with this.
I'm just really frightened that I'm getting something that's going to make my work more difficult when I was trying to make it easier.
Often these kinds of decisions are made for no particularly good reason. "My cousin works for the company that makes it, and he assures me it's a great product."
For a new setup, with no history, and no investment in tooling, that's probably a mistake
> This has already been vetted by IT. It's what our tech support contractor uses.
I would consider two tools only, in a modern environment: git, and svn for pure version control.
if you want integration with issue tracking, then RTC, or GitLab
1:17 PM
I'm prepared to push back if I don't like what I see.
Q: Check if a directed graph contains a cycle

RaitoI am trying to optimize execution time of this function which detects cycle in a directed graph: g = { 1: [2, 3], 2: [3] } cur_path = set() def isCyclic(g, vertex): global cur_path cur_path.add(vertex) for neighboor in g.get(vertex, []): if neighboor in cur_path: ...

Q: 100 gunmen in a circle kill next person

CaridorcI am very happy because I solved this problem with very little code: """ 100 people are standing in a circle with gun in their hands. 1 kills 2, 3 kills 4, 5 kills 6 and so on till we are left with only one person. Who will be the last person alive? Write code to implement this ...

Issue tracking is a bonus, not a requirement.
The big thing here is we don't use any VCS at all right now.
Well, that is a serious problem
Yeah. It is. Which is why I initiated this.
I think I've seen enough summations for now
1:20 PM
@RubberDuck Personally, two things: 1. IBM is full of very large systems that do complicated things... we use RTC or ClearCase/ClearQuest for large projects, and git for the rest.
@skiwi Are you working with boolean circuits or something?
@rolfl I'm curious, why the choice for svn?
@SimonAndréForsberg It's part of the AI course, this is the probability part
I'm trying to study, all I see are summation signs though
second thing: 2. I would not work with PVCS in the modern world. (personally)
@rolfl Thanks for the insight. It's much appreciated.
I'm going to put my case together and push back.
but, note that I am in the situation where I can say things like that ("I'm not going to work with PVCS")
1:22 PM
@RubberDuck Do you have clear arguments why the antique system is worse than git?
What are they gonna do? Fire me? They're likely to do that anyway...
@skiwi File locking.
2 mins ago, by skiwi
@rolfl I'm curious, why the choice for svn?
One of the reason I asked for this is to ease simultaneous development.
@RubberDuck Oh god... case settled
A system that locks files and can't merge defeats one of the major pain points.
1:23 PM
@RubberDuck - note that is not strictly true ^^^^
Yes... I understand.
But, lets say I make an informed decision to change a class' interface.
A locking VCS has significant benefits (Clearcase is a locking system I have used before as well, and it works).
Can you elaborate please?
Merging is a complicated, bug-introducing process.
^^ that
1:25 PM
Eliminating merging is actually a good thing.
notifying people that someone else is working on your file before you start, is a good thing.
I'm voting to close this question as off-topic because optimization questions are more suited for CodeReview.SE. — cpburnz 1 min ago
YOu know that you will have to coordinate a change before you get far enough down the road that the merge is complicated
It all comes down to discipline, though.
whatever system you use.
in Git, it is good discipline to make small changes, often.
@rolfl That's true. "Whatever system you use"
Which is how we tend to make changes now.
Just the nature of what we do.
In other systems, it may make sense to lock out a chunk of the code, make large changes, test, commit, and then the next person can take a clean code base, and break it their own way
Hmmmm.... I've gotta go, but you've given me lots to think on. Can't thank you enough.
I'll let you know how it all pans out eventually.
1:28 PM
I would still go with the git process... ;-)
@skiwi - about SVN.... I like svn
If I can make it happen.... yeah. That's what I'm aiming for.
svn and git are two completely different ways of thinking about things.
meh... the one thing I absolutely hate about SVN is how hard a time it gives you with versioning and releases..
Compare that to CVS or anything else.....
Hmm, how do I explain that I like learning new things, but hate studying
1:44 PM
2 things : it's more likely a CodeReview, and please reformate your code. It's unreadable — FunkySayu 43 secs ago
I'm ok for moving to Code Review, is it possible or do I have to re-enter everything? Thanks (I just had a look at code review). — Julien Cochennec 22 secs ago
Q: How to decouple database from the object that is created from the record?

thelolcatI'm trying to follow coding standards that I see in Symfony and other frameworks but I have trouble separating classes from each other. For example, my object looks like this: class Place{ protected $id, $name, $lat_long, $parent_id; public function __construct($id, $name, ...

Q: About code readability

cFreedNOTE: I apologize in advance if anybody (or more people :-) find this question off-topic, but I can't figure out where to put it otherwise. It concerns code readability, not regarding the fact of using a particular function, instruction, etc., but simply the presentation. Especially the use of s...

@FunkySayu This does not belong on Code Review, because there is a problem in the code: My problem is that everything is working, except when I put the ordered numbers in the entry box, it always is wrong. Code Review requires code to be working as intended. — Simon André Forsberg 1 min ago
Haven't thought up next blog topic yet.
I believe you can flag the question for migration, and it gets done automatically (sort of): meta.stackoverflow.com/questions/266749/…. It might be better if you (the original asker) did that. Otherwise, you can always click "edit" and just copy/paste everything from the big box, which should avoid too much extra work. — DavidW 22 secs ago
2:18 PM
Q: Looking for Song Title Suggestion Code

MeghanI need a code but have no idea how to write it. I want the program to ask the user, “What genre do you want to listen to? Country, pop, hip-hop, or rock?”. The user will then type in one of those genres. I want the corresponding song titles to be printed when they enter the following genres: Cou...

2:33 PM
Q: C# Chat - Part 2: Client

ArtOfCodeThis is the second part of a multi-part review. The first part, the server for this client, can be found here. I've been building a simple C# server-client chat-style app as a test of my C#. I've picked up code from a few tutorials, and extended what's there to come up with my own spec. In this...

2:53 PM
What's the difference between SVN and git, @rolfl ?
@nhgrif They have different philosophies.
SVN is an incremental system, where each revision is a diff from the previous revision.
and git works snapshot based
git is a snapshot system, where each commit is a standalone pricess
Then, the implementations are different.
SVN has a centralized server which keeps the master implementation and contols access, merges, etc.
Git is distributed.
there is no master node in Git on a technical level. Each 'clone' has equal technical seniority.
the only concept of a master location for git code is the human imposed one of things like GitHub,
There is nothing technical about the github repository that makes it more special than other clones though
@rolfl meh. usually it's a --bare repo...
Well, if you want to compare the repo vs. the workspace, that's different.
2:59 PM
I went looking for what @JeroenVannevel said to me to refresh my mind on Extension Methods. and then I realized I had already done it in my code! lol
You're welcome!
@JeroenVannevel are you going to run for SO moderator this year?
thanks. now I have an Extensions.cs file in my project. I think I should do that for all of my projects.
maybe the election page with nominations opening in 5 hours?
@Vogel612 I was thinking Code Review..... :(
3:03 PM
well that would be nice
and I do hope there's CR mod elections this year..
Not happy with the ones you have, huh?
but if none of our current (and awesome) mods step down, I think the results are pretty.. obvious ;)
@rolfl now that's what you said...
@rolfl not saying that, it just marks our true graduation, where we lose that pesky "Beta" label
There was a site recently..... hmmm
Q: Passing values to a partial view

gerdiI have button which I would like to use for update and create actions. Currently a create action is based on the URL parameter equalling 0 . If for instance, in a foreach loop item.id >= 1 the action then becomes an edit and maps the properties for that item. create : blog/0/new update : blog/3...

Q: HackerRank Angry Professor challenge

Calculus5000I've written an answer to HackerRank's Angry Professor problem. Please let me know if there's a quicker/better way of solving this as I think I wrote quite a bit of code for this problem (answer has to be in 1 class btw). Also, any improvements on my code in Java 8 are welcome too. Problem state...

3:07 PM
@Lyle'sMug You saw this, right:
Q: Congratulations! You're about to graduate... with a twist

Robert CartainoI wanted to pass on the announcement that this site has been cleared for graduation… congratulations! Graduation comes with it some perks — a listing in the footer of the other sites, you can start migrating content to and from this site, we have things like "community promotional ads" which are...

they still have the beta label, though ;)
I notice that too ;-)
I hadn't seen that one. is there a vote on whether or not we should bug the powers that be for the same "twist" ?
meh. Why would we? honestly I prefer to not be the guinea pig
I don't want to be any kind of pig. I like pigs, but I would find it hard to code without hands.
3:18 PM
Yay I got it to run. Now I can go do idiotic stuff with it!
In this code am able to say return sum(filter(iseven, map(fib, range(1, n + 1)))) where sum and filter accept tuple = (1, 2, 3, 4) either.
I tried replacing range() with range_func() in this code but fib does not work, How do I make it work?
error is: TypeError: unsupported operand type(s) for -: 'tuple' and 'int'
please help me!!
Yeah, that sort of thing does not work so well on Code Review, or any other chat room.
Q: How can I limit pygame.draw.circle?

NHamesSo I have a draw area that I want to draw to and borders that I would not like to draw over. Currently, if the mouse positions (m_x & m_y) are within the circles radius of the border I have the program draw the circle and then redraw rectangles which cut off the part of the circle which crossed. ...

1 min ago, by overexchange
error is: TypeError: unsupported operand type(s) for -: 'tuple' and 'int'
You cannot subtract an int from a tuple.
which is quite unsurprising...
3:24 PM
So, each element in tuple = (1, 2, 3, 4) and r = range(1, 5) are int?
@Vogel612: nah, I don't feel like going through that process again
and when you didn't make sense before, you actually managed to make less now..
@JeroenVannevel so bad?
where as each element in the sequence returned by range_func(1, 5) are not int?
Just really, really tedious
Answering 20 questions nobody will ever read. Lots of commenting
and the "letter of motivation"
3:27 PM
See the help center - note that your question would likely be closed as too opinionated on programmers.se as well. Your question is not a question as such, it is a discussion, blog, or article. It's an opinion piece requesting debate. There's nowhere on Stack Exchange where such poll questions are on topic, that I know of. — rolfl ♦ 46 secs ago
3:55 PM
@Vogel612: thanks a lot for this response, which now enlightens me. I didn't realize this place's rules were so limitative. And I'm glad you pointed me to the Code Review Chat, since anyway I find the issue quite important to improve code. Thanks anew. — cFreed 45 secs ago
I see @cFreed ;-)
Welcome to the 2nd
There's really not much value in seeing more than one function in your screen, but functions shouldn't span multiple screens...
@Lyle'sMug - Running: stackoverflow.com/election/6 ?
4:10 PM
3 hours until nomination phase, btw.
Hi @rolfi, thanks for the welcome. As a newbee here, I'm a bit confused. Could you guide me on how to propose others to look at my question, recently refused (but I've seen it appears here, at the time it was posted... ???)
@rolfl I could use the practice for when CodeReview Elections come up.... single eyebrow raise
@Lyle'sMug can't enter anyways. There is a minimum requirement of 3k rep.
Malachi, South Dakota
2k 3 13 31
^^^ need 3K though
oh snap!
4:11 PM
@cFreed Your question is automatically posted here in chat by the feeds bot after it is asked.
@cFreed meh. the question is off-topic. making more people look at it will probably get you nothing but downvotes :(
Getting others to look at the question is ^^^ that.
How do I draw an analogy..... how about: the government creates the laws, and the courts enforce them?
@rolfi: I don't understand, since @Vogel612 lead me here, saying it was the right place for my issue, rather than in the Q&A part
it's more like the federal and state law.
@cFreed well chat is simply better for discussing things
It's better than hashing out a complicated thing in comments on a closed question.
4:14 PM
@rolfi: so not the right place here, too?
@cFreed - let me summarize.... you want to know whether it is better to have more compact code, than lots of white space?
@rolfi: quick response is 'yes'. But I'm interested to others opinions.
7 mins ago, by nhgrif
There's really not much value in seeing more than one function in your screen, but functions shouldn't span multiple screens...
1 min ago, by cFreed
@rolfi: quick response is 'yes'. But I'm interested to others opinions.
Yeah, and that's the basic issue with your question on the main site.
Code Review is not the place to build, debate, and opinionate on whether lots of whiitespace is good, or bad.
Code Review is the place to say: this code does not use enough whitespace, or this code uses too much whitespace.
the difference is subtle.
How does one arrive at the latter two conclusions?
4:19 PM
@rolfi: the difference is subtle: sure!
@Rainbolt By applying what is already understood to be best practice, by applying common conventions that are used... and, @Rainbolt - by doing the opposite of Code Golf ;-)
Sure, there are differences, but they are suprisingly few, and, where there are uncertainties, the code review answers often don't recommend one way, or the other, but instead ignore that part completely.
code review answers that recommend the wrong practices, are downvoted by others too... so, bad answers (which most of the CR voters disagree with), go to the bottom.
The subtle difference then, is that bad practices are 'debated' in the voting on answers, not in direct opinion-seeking questions.
Maybe @JeroenVannevel or ~@nhgrif would like to run for SO mod?
Did that once. Wearing the tshirt they gave me now
When my tshirt gets too small, I'll run for mod again
4:26 PM
So, to be short, what is already understood to be best practice comes from whet most of the CR voters agree or disagree?
To be shorter, most of us already agree on a best practice.
@cFreed In a sense, yes.
But, it is more practical than that
Consider your question.... what sort of answers will it get?
@rolfl What is more practical than what?
You guys think a link to the good subjective vs. bad subjective would help?
4:30 PM
@RubberDuck Why not?
Why not ;-)
@Hosch250 Hmm... it looks like a vicious circle: where do you consider best practices initially come from?
@cFreed Many of the best practices come from documentation.
Python, for example, has the PEP8 style guide, which is used by most Python programmers.
Robert Cartaino on September 29, 2010

Stack Exchange is about questions with objective, factual answers. We’ve been crystal clear about this for as long as I can remember, even back to the earliest, pre-beta days of Stack Overflow. It’s right there in the standard Stack Exchange FAQ:

What kind of questions should I not ask here?

Avoid asking questions that are subjective, argumentative, or require extended discussion. This is not a discussion board, this is a place for questions that can be answered!

Thus, questions that are not answerable — discussions, debates, opinions — should be closed as subjective. It seems simple enough: Fact good; opinion and discussion bad. But why? …

Others come from common sense - keep your methods to one thing, don't write a "god" method.
4:32 PM
And from years of experience, books written by the "greats".
Jon Skeet, for example.
@hichris123 Gone ;-)
@rolfl Thanks! :)
Or Martin Fowler, Steve McConnel, or Uncle Bob.
4:33 PM
He is so good that he even gets people to pay to learn what not to do.
Heck, I'd toss Jeff Atwood and Spolsky in that mix too.
As English is not my native language I have great difficulty following: I give up ...
@cFreed Sorry, we can go slower.
Basically, 50 years of collective experience determines best practices.
and, what's more, is a question challenging what the best practices are, or should be, is just going to end up in a flame-war of bitter fighting.
4:36 PM
@Hosch250: thanks a lot, but Is is beyond that. Not only the speed, but the fact than I'm not familiar with the current language.
Q: Merging two sorted singly linked lists to make a third sorted linked list

user4275686I have the following code. The merge method seems to get stuck in an infinite loop and I can't figure out why. import java.io.*; class data { int d; public data(int s) { d=s; } public int retdata() { return d; } public void display() { System.o...

@rolfl K&R vs. TOTBS anyone?
No one wants to have that fight..... =;)-
It is always amusing when I take a day off school (Sunday), come back, and have 100+ discussion postings to read...
shhhh my first class in 12 years starts tomorrow. I don't want to think about it.
4:39 PM
@RubberDuck Real college class?
If I could just take one that interests me, I'd love it.
But 5 that don't interest me...
Auditing one online, but yes. I could pay to receive the credit if I really wanted to.
@cFreed I see your profile indicates you are in France. If you like I can try and help with your questions if you prefer French
I wasn't sure if it was a work class - my dad has to take N hours of training each year to keep his job.
(also, Monking!)
4:51 PM
Q: React mixin to declaratively get Bacon.js event steams

Bob LauerI wrote a mixin to declaratively get a Bacon.js event stream. So instead of onChange={this.handleChange}, you can do changeStream={this.handleStream}, and this.handleStream will be passed an onChange Bacon.js event stream. My big concern is that I have to override React.createElement in order t...


« first day (702 days earlier)      last day (1955 days later) »