« first day (894 days earlier)      last day (3127 days later) » 

12:00 AM
RELOAD!
There are 1580 unanswered questions (94.3190% answered)
For the record, I'm not saying this is a bad question, I'm just suggesting that it's off topic for here. This is not a code review site. It may be worth taking a look at some of the other SO sites though. — DavidG 16 secs ago
 
0
Q: Markov chain chatbot producing poor results

64test1234In my high school AP computer science class we're making a very basic chatbot that replies with predefined answers. I decided to have a bit more fun with it My program is basically this answer on stackoverflow. The dictionary is being created correctly using several popular works of literature, ...

 
12:33 AM
No one here?
 
I'm here.
 
Hello.
 
Hey @MannyMeng
 
0
Q: MIPS How to put a whole bit pattern into register 1

JasonCoffinI am severely stumped by this question I have been given in my assembly class. Go easy on me because this is my first time trying to use this. But the problem is to put the following bit pattern into register $1. 0x1234ABCD

 
12:49 AM
Anyone have any tips on what to do with errors like these?
org.codehaus.groovy.runtime.metaclass.MethodSelectionException: Could not find which method get() to invoke from this list:
  public abstract java.lang.Object java.util.Map#get(java.lang.Object)
  public abstract java.lang.Object org.bson.BSONObject#get(java.lang.String)
Is there a way to fully qualify a certain operation? Or am I thinking about it wrong?
Calling code:
@Test
void testDeleteUser() {
    testUserObject = testUserDocumentBuilder
            .create()
            .get()
    assert testUserObject instanceof DBObject
    testUsersCollection.deleteUser( testUserObject.get() )  // error here
    assert !testUsersCollection.find( { user_name : USERNAME } )
}
 
@Phrancis No idea...
 
@Phrancis Is it because you aren't passing anything to get() when you should be?
 
If I am correct, it seems you are m...
...issing a closing parentheses... Never mind...
 
@MannyMeng Yes, I'm getting a different error now, my bad for confusing
Now my test actually fails, which is good
 
0
Q: Checking locked users using Identity 2.0

paulpitchfordI'm writing a theoretical MVC application to aid in learning more about ASP Identity 2. In real terms I'm new to ASP Identity as a whole but thought I'd jump in in this release as it's the default in new projects and everything I read about it seems to mostly suit my needs. There is one iss...

 
12:53 AM
Assertion failed:

assert testUserObject instanceof DBObject
       |              |
       null           false
 
I'm scared to post a design answer...
 
0
Q: Project Euler Problem 2 in Java

Manish Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find t...

 
1:13 AM
#3: (yay!)
0
A: Project Euler Problem 2 in Java

Manny MengYes, it is unnecessary to create a sequence, then add it. Just simply add while counting up. Take a look at my question and this answer; it will simply create the sequence while adding, without even having to store the sequence, just the result and the previous numbers. It takes the advantage of ...

 
1:38 AM
Code review, "gimme teh codez", and requests for reading material are off topic. Answering off topic questions is not okay. — Clear question with examples 7 secs ago
 
1:52 AM
0
Q: Reading a text file in python and adding categories from it

GopherTechHello I am a very new programmer who is self teaching Python. I have encountered a very interesting problem and need some help in creating a program for it. It goes like this A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: The name of t...

 
#4: (YAY!)
 
0
Q: Arduino Serial data input output

OisianHi i have created an Arduino sketch that i am using to send and receive data via serial it works pretty well, doesn't seem go wrong as long as the correct formats are received is there anything i could do to improve this/shrink it clear up some code smells? thanks String dataString; void setup()...

 
0
A: Bucket Sort with Linked List

Manny MengThis code seems to be a specific BucketSort made for a specific program. I would instead create a more generic BucketSort: public static <E extends Comparable<E>> void bucketSort(E[] array) { // ... } public static <E> void bucketSort(E[] array, Comparator<E> comparator) { // ... } No...

 
@njzk2 you are right. I will move this to the codereview section. I did not know it was a thing, but thank you! — cookiez 32 secs ago
 
@Duga CR NAA on that one if it is migrated.
 
2:50 AM
This might be more suited to codereview.stackexchange.comRoland Heath 47 secs ago
 
3:11 AM
Love how I called out the key points that were re-iterated in the comments (ie: C doesn't have classes), reduced the code to main() calling a user defined function, and instructed OP to try and write it himself and use the code review SE site for help, and I get 5 downvotes and a delete request. — Dogbert 56 secs ago
 
3:44 AM
Welcome to SO. SO is not really for general code review. Do you have a more specific question about your code? — paisanco 15 secs ago
 
0
Q: Waterloo Programming Contest: The Game of 31

ishyfishyPlease review my program for the Game of 31. Here is what the game is about. GameOf31.java import java.util.HashMap; import java.util.Map; import java.util.Scanner; import java.util.Stack; public class GameOf31 { private static Scanner stdin = new Scanner(System.in); static Map<Integer, Integer

0
Q: Reading a text file in python and adding categories from it

Cain BoozerI have encountered a very interesting problem and need some help in creating a program for it: A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: The name of the client, the service sold (such as Dinner, Conference, Lodging, and s...

 
4:37 AM
0
Q: Find permutation of a specified lexicographic rank

WildcardThis is one result of my work on Project Euler to learn Java. I'm interested in how well this conforms to best practices as well as any recommendations on efficiency. (I'm pretty sure this code is a lot more efficient than it is readable, but it's not deliberately obfuscated, I swear! :) ) imp...

0
Q: Checking if IDs in array are not null and adding them into new array

Leon GabanMy view object: { description: "2tik 2tags" id: 100 portfolio: "TSLA" term_id_1: 260751 term_id_2: 285493 term_id_3: null ticker_1: "GOOG" ticker_2: "TSLA" ticker_3: "" timespan: "ld" top: "" } I need to grab the term_ids and stick them into a new ar...

0
Q: Simple neural-network simulation in C++

dblissThe C++ code below simulates the timecourse of the membrane potential (V) of a population of 128 leaky integrate-and-fire neurons using the Euler method for numerical integration. It produces data for three data points in Figure 1 of this paper. I have an equivalent script written in Python. E...

 
4:59 AM
Whew. After losing at least 10 minesweeper games due to a forced chance guess at the end with anywhere from 1 to 5 bombs left, I finally succeeded - on another chance guess.
And midnight, so I'm going to bed. See you.
Interesting. The very second I turn 136, the seconds I've lived overflows a 32-bit integer.
I wonder if that is pure chance, or if it is ?
 
5:12 AM
Monking
 
0
Q: Android App Interview (List JSON data)

John61590I recently submitted the code for this for an 2 hour interview but I was rejected. I was given this feedback: There is a lack of proficiency from what we would expect, specifically the data side. We saw inconsistencies with structure, style, and spacing, as well as, some deprecated code (Thou...

 
5:32 AM
@Sanfer Welcome to C. Consider even simple addition: codereview.stackexchange.com/questions/37177/… and my commentchux 5 secs ago
 
6:08 AM
If you have working code that you'd like to improve, it could be a good fit for Code Review. — TigerhawkT3 5 secs ago
Unfortunately asking "How to ..." will be off topic on code review because it is asking for adding a feature. If you have figured out how you avoid the repeating elements, we would be glad to review your code to make it shine. — Heslacher 11 secs ago
 
0
Q: New to Bash Linux and Program World

DragonHammer8816Hello I have started my adventure in this realm Cause I want to Learn Bash Code Programming and also the Linux World. I was wondering for the Bash part what is the best way to learn Bash or Shell Scripting. and also Can I have a Assignment to start of with reference and good websites or ebooks to...

 
6:26 AM
Thank you guys. I was, in fact, unaware of CodeReview. The solution above works, but is not optimal. I'll repost it in CR pointing this out. — user1435698 23 secs ago
 
0
Q: Implementing Search method For a Class

AkbariIn my web app, I have a view where user can search in receipts and drafts. I've implemented this ability in search method in my view model, but I'm not sure if this is the best place to put it. So I'll let you take a look at it. public class ProductCardSearchViewModel { public IEnumerable<P...

0
Q: Bash Basics Wanting To Learn

DragonHammer8816I want to Learn Bash. Where is the best place to start. and I want a Bash Reference or Assignment to Start with on my first time.

1
Q: Reorder a list in Python to avoid repeats.

user1435698I am trying to check if a list has any consecutive repeating elements and then reorder it such that the repeats are avoided. If that is impossible, then return False. For example: checkRepeat([1,2]) Out[61]: [1, 2] checkRepeat([1,2,2]) Out[62]: [2, 1, 2] checkRepeat([1,2,2,1,1]) Out[63]: [1, 2...

 
6:48 AM
0
Q: SIMD matrix multiplication newbie

Sebastian LindgrenI've come across a book describing matrix multiplication using SIMD. [Computer Organization and Design The hardware software interface by David A. Patterson, John L . Hennessy, 5th edition, page 476]. But I'm having some trouble when I try to use and modify the function. My three questions are: ...

0
Q: How can I make better Engineer?

yarixI have Engineer which looks not very good. Could you point me, how can I make him better organized? Share with me some best practices! I have interface: public interface Engineer { String HOMELESS = "homeless"; String ENGINEER = "engineer"; String SOFTWARE_ENGINEER = "softwareEngine...

0
Q: Trying to fix run method to create gravity effect when ball is bouncing

Nasapublic class Ball extends ActiveObject { // Size constants private static final int DIAMETER = 20; // ball diameter (in pixels) private static final int TRACE = 2; // trace diameter (in pixels) // Motion constants private static final double REBOUND = 0.9; // fraction of vertical speed ...

0
Q: Elegant way to check if two numbers have the same sign

John DemetriouIs there a more elegant way to check if two numbers have the same sign than the following? bool sameSign(int num1, int num2) { if (num1 > 0 && num2 < 0) return false; if (num1 < 0 && num2 > 0) return false; return true; } or it could be ...

 
7:38 AM
Monking
 
hey @Mast
 
1
Q: Implementing xrange in python

CodeYogiI wanted to learn about Iterable and Iterators hence thought get my hands dirty rather reading theory and forgetting it. regarding the code, I am curious how can I improve readability and error handling of my code. I also thought to practice and include test cases. class foo_range(object): "...

 
This kind of question might be better suited for code reviewtobias_k 31 secs ago
 
8:12 AM
I'm voting to close this question as off-topic because it's asking for code review. That's off topic here, and needs to be on our Code Review site instead — Gagravarr 28 secs ago
Yes, duplicating existing library functionality is wasteful and error prone. You can't just ask for a code review (which makes the question out of scope for SO), you'd also have to test it with actual values, edge cases etc. — Panagiotis Kanavos 31 secs ago
@Gagravarr While your recommendation is correct, we prefer that you use "too broad" as the reason, because there are occasionally questions that are on-topic for both sites. — 200_success 18 secs ago
 
0
Q: Typesafe Unit Code Generation

YuushiI've previously posted some code that deals with making Cartesian co-ordinates safe at compile time. I've been doing a bit more thinking about this in a more general setting, as it is a problem that I quite consistently run into in code bases (all quantities are just declared as double and then ...

 
What is the problem? You don't even ask the question, just ask for a code review. What problem are you trying to solve and why do you think that this is the answer? — Panagiotis Kanavos 25 secs ago
@PanagiotisKanavos: aargh. I don't know if this code works so this is not code review. And problem: convert little endian byte array to integers — quser 34 secs ago
 
8:31 AM
-1
Q: is there a side effect in replacing two side of an if statement

Masih AkbariI'm reviewing a project in my work and i come across some if statments with replaced two sides from normal way for example if(NULL != fnIsWow64Process) is there any side effect in this behavior? and is there any difference between this code and if(fnIsWow64Process != NULL)?

 
Zak
monking @all
@CaptainObvious VTC please
 
hey @Zak
 
Downvoted because it's not obvious what the question is. If you aren't sure whether it works, then you should test it so that it is working to the best of your knowledge, then ask on Code Review. — 200_success 17 secs ago
@quser It is a question. But one that belongs in code review ;) — kevintjuh93 53 secs ago
 
8:47 AM
@Duga No, not this again.
@CaptainObvious I suspect this user is joking around.
 
@Duga I am not saying anywhere that I have written a more robust and improved version of xrange. The context is very clearly written above the question. Please refer
 
9:03 AM
@CodeYogi To what message are you responding exactly?
 
actually this is not a code review forum, you must tell us WHICH and WHERE is exactly your problem... — Jordi Castilla 8 secs ago
 
I am here first time and I saw your comment on my question
 
@CodeYogi Duga doesn't comment on questions. I assume you mean this question, which appears to have no comments (but has an answer).
How can we help you?
[FAIL] Killing all remaining processes...failed.
I think I just trashed another system...
3
 
9:22 AM
Ya, that question is asked by me
 
@Mast the question does have a deleted comment. @Duga has nothing to do with it though.
 
SimonForsberg comment from me ?
 
@SimonForsberg That clears part of it up, thanks.
 
yup, comment by @Heslacher
>
If you place the context of your question at the top of it you will atract more people because in its current state it looks strange on the question page. – Heslacher 1 hour ago
deleted by Heslacher 1 hour ago
 
ok, I have deleted the comment because @CodeYogi did what I had asked.
I don't want to leave obsolete comments laying around
 
9:33 AM
good good ^^
just showed it here for @Mast to get some context. Normally I don't show removed comments to others.
 
@Mat'sMug you every curious what became of that question I asked a week ago or so?
 
@SimonForsberg no prob. Back to figure out how to rotate a 2D array having a specific angle.
 
0
Q: How to push a pair of 3 integers into Priority Queue in Java?

lavee_singhI'm trying to push/add a pair of 3 integers into a PriorityQueue, but getting an error. Here's my code: import java.util.*; class pair2{ public int first, second; public pair2(int a, int b){ this.first = a; this.second = b; } } class pair3{ public int first3; ...

 
I don't do phyton.
 
9:45 AM
I don't do .
 
Monking
 
My next goal is to take the 8th rank in the all time ranking.Sorry @Jamal ;-)
hey @SuperBiasedMan
 
@Mast Oh geez, I don't work with packages myself but I'll take a look.
 
Monking
 
Monking
 
9:52 AM
0
Q: Please reconsider the rule: Pseudocode, hypothetical code, or stub code should be replaced by a concrete example?

Michal StefanowRelated: Why is hypothetical example code off-topic for Code Review? Is pseudo-code alright when asking about performance? The gray areas of Code Review: Hypothetical / Example code My concrete examples usually contain some proprietary things. Even a variable name or package name can convey m...

 
Monking
 
Is Myget.org to slow, or am I just to impatient...
 
it's you
 
@Mast I thought your wife was home again...?
 
0
A: Please reconsider the rule: Pseudocode, hypothetical code, or stub code should be replaced by a concrete example?

MastWe've all been there one time or another, so we understand what your problem is. However, we simply can not throw this rule out of the window. It makes it unnecessary hard on the reviewers and it would open the door for categories of questions we really don't want here. Please scour the meta for...

@skiwi She went to bed early.
 
10:06 AM
Means whisky drink time? ^^
 
I had no reason not to.
 
Well, if you can handle it
 
If you want to get review for your code you have to go CRhindmost 44 secs ago
 
0
Q: Data Structures in C (Single Linked List) - Follow-up

AntonioCSThis is a follow-up from my previous question! I cleaned up the code and added all the notes from the answers. I have also updated the code on github LinkedList.h #ifndef LINKEDLIST_H #define LINKEDLIST_H #ifdef __cplusplus extern "C" { #endif typedef struct LinkedListNode LinkedLi...

 
@skiwi My wife or the whisky?
 
10:11 AM
@Mast Eh, I was actually just talking about the whisky :P
 
@hindmost I daresay that the code is not finished, since there is an obvious problem with it's functionality. As such it is off-topic for Code Review. For more information, see: A guide to Code Review for Stack Overflow UsersVogel612 47 secs ago
 
I think I'll need to take a new look on my controller library, right now I'm intending something to be done as long as button A is held, but there's not really a way to do it, sure the caller can handle button pressed and button released events
 
@skiwi That sounds like the obvious way to do it, why wouldn't it?
 
@Heslacher sin and cos
 
@Mast Maybe the library can provide ways that are nicer for clients to use
 
10:17 AM
@skiwi Make it a function button_held(button)
 
It's something that moves over a 180 degree angle, I might as well let it increment/decrement 10 on every button press actually, because holding it down is also a bit weird
@Mast It would need some kind of timer though
 
@SimonForsberg yeah, thats what I am at the moment. Got some code from the net which is using Bitmap and I am refactoring it to use the 2D array directly.
Thanks
 
@skiwi button_held(button, time)
 
Yeah, or time interval maybe
 
A long time ago I used SCAR to automatically mine data the hard way (macro to macro to macro). It's never pretty, but often works.
 
10:39 AM
There's only one Reversal badge ever awarded on our meta. One.
We must be a friendly bunch, not to downvote everyone into oblivion.
3
 
Zak
I really wish VBA didn't switch the [key, item] order when adding to dictionaries vs collections. It just adds unnecessary confusion.
 
0
Q: Update Virtual Property in a Code First Model using Independent Association in Entity Framework 6

JordbaerHjelmenI have a Model that looks like this: public class Item { public Item() { FilePaths = new List<ItemFilePath>(); } public int Id { get; set; } public virtual ICollection<ItemFilePath> FilePaths { get; set; } } public class ItemFilePath { public int Id { get; set;...

 
Thoughts?
1
A: Design-only answers?

MastI think we have a XY problem here. The answer stated exactly what the OP wanted to know and is therefore a good answer. However, while OP did post re-viewable code, an essential part of the question wasn't a good fit for CR (emphasis mine): It occurred to me I should probably be asking here ...

@Zak Are they meant to be used interchangeably?
 
11:00 AM
Not completely sure, but isn't it better to ask this at codereview.stackexchange.com? — Dmytro Shevchenko 49 secs ago
 
Zak
@Mast Kinda. Collections are limited, stripped-down versions of dictionaries
 
"Is this somewhat okay?" — Do you have some reason to think it isn't? Are you just looking for a code review? — Quentin 44 secs ago
 
Zak
but they're both hashed linked-list structures
@Mast IMO, the answer in question is nearly an awesome answer, if only it applied the concepts to the OPs code with examples of what's good/bad and how it could be improved to better follow the points made.
But, without that, as you say, is not really on-topic for CR.
 
@DmytroShevchenko Generally, these kinds of questions ("code works, how can it be done better?") are too broad for Stack Overflow, but are welcome at Code Review, yes. — Simon Forsberg 38 secs ago
 
Zak
In fact, it doesn't even mention the OP's code
 
11:08 AM
I like design review questions, this is just not a design review answer
It doesn't review anything. It's just a generic list of general things to think about when making anything
 
Zak
1
A: Design-only answers?

ZakIMO, the answer is not a good one because it doesn't actually reference the OP's code at all. If, for the points it made, it highlighted part of the OP's code that did/did not follow them with a suggestion of how it could be done better, it would be an awesome answer. But, without that, I think ...

there we go
 
@Zak I've pulled something like that once before, which worked wonders.
12
A: Password hashing and matching

Mast However, there is a lot of talk about what implementations are secure and not secure. How does my method measure up? Is it secure? Are there more secure methods in PHP for hashing tokens and matching with tokens later on? Since you're specifically asking about security, I think reviewing you...

I did not touch OP's code. Wasn't necessary.
I read it and concluded he rolled his own. That was all I needed to know from his code.
Sometimes people ask questions which may look like a good fit to the site but ask for answers which aren't.
 
Shouldn't this be asked on Code Review? — Sweeper 38 secs ago
 
2
Q: Sort array of Numbers with some values always first

RajeshThe first number will be dynamically selected and remaining array should be sorted ascending int[] array = {1,1,0,1,2,2,0,0}; int firstNumber = 0;// dynamic can be 0 or 1 or 2 int numberOfOccurances = 0; //Basic sort functionality for(int i = 0 ; i< array.length; ++i) {...

0
Q: Canonical Implementation for a Concurrent Subclass of NSOperation in Swift 2

CouchDeveloperI would like to develop a kind of template or canonical implementation for a concurrent subclass of NSOperation in Swift. See here for my previous request which is implemented in Objective-C. In that previous solution, there are still issues when the operation will be cancelled while it has not ...

 
AI never ceases to be amazing: reddit.com/r/SubredditSimulator/new
 
11:33 AM
> Another system is the only real good thing in my life that let up to the main argument about these self ID forms. It's only my opinion, but I just feel like the Universe is not eternal. Passwords may become confused or lost due to new information is evident that I have been looking down at his speedometer, in which case obviously 50% + 1 support.
 
You may want to put a > in front of that quote, so it renders as a quote ^^
 
@skiwi Quotes and multi-line are tricky, never get those to work properly.
 
That 50% + 1 support is really interesting though
 
Indeed.
 
11:51 AM
0
Q: SDF queries to split the table into sub table

Anil GadiyarI have some data in my SDF Server compact edition file and I was wondering if there is any Query where we can split one table based on id into sub tables. Example: 10/15/2015 3:07 PM 00-15-8D-00-00-35-DA-B8 0.0462 0.0169 0.0012 0.0016 0.0001 0 5655 227 2 10/15/2015 3:07 PM 00-15-8D...

 
Nice, my laptop just decided to reboot
2
(Windows obviously)
 
@Mast me fix. this is not a multi-line message
 
I was confused for a moment when I got a desktop notification saying that @Simon has notified me :P
 
12:08 PM
We cannot make it simple for you. If it is working code, CodeReview would be a better place. If you have any question about something not working, add that info — sam2090 35 secs ago
 
0
Q: Quartz2D, circular slider performance optimization

Roman SimenokI have a circular slider. Each time i move finger i call [self setNeedDisplay], get new angle to change handle position and mask arc. When i move very fast my CPU load about 70%, it's very hight as for me, because if i have two sliders and move them at the same time i'll have problems with FPS. I...

 
@skiwi Win10 auto update?
@SimonForsberg I'll dive into the sandbox to figure out how quoting goes exactly.
 
@Mast Laptop still runs Windows 7 Enterprise
Still haven't gotten around to update it :D
 
I'm still running 8.1 because I haven't found a work-around for the forced updates yet.
It's my laptop. I and I alone decide when it will update and when it will reboot.
Not M$...
 
You can always install Linux on it :P
(Or make your own OS)
 
12:18 PM
Can you not block windows update with a firewall, or rewrite your hosts file, or something?
 
@skiwi I did, dual-boot.
@JacobRaihle Redirecting the update server to localhost is the usual trick, but I've seen no confirmation whether this actually works in Win10.
 
@Mast I guess the only safe bet is to assume that everyone who tried has been silently killed
 
Unless you upgrade to pro.
7
A: Stopping all automatic updates windows 10

magicandre1981if you have the Pro Edition, open group policy editor (gpedit.msc) search for the Configure automatic updates entry, and select Notify for download and notify for install. When Windows detects new updates it shows a toast notification. You can also use the troubleshooter from Update KB307...

@JacobRaihle Most likely.
Hmmm, perhaps it is possible now.
1
A: How can I defer updates in Windows 10 Home?

VinayakI just upgraded to Windows 10 Home Single Language from Windows 8.1 Single Language a few minutes ago and I have the Defer upgrades setting available by default under Settings > Update and security > Windows Update > Advanced options. I am using Build 10240 I googled a bit and according to Neo...

 
12:34 PM
Deferring isn't disabling though
0
A: How do I refactor JavaScript case statements?

ValentinAnother one approach: var val = ui.value, box = $('#message'), chr = val > 50 ? 'X' : (val < 50 ? 'V' : 'P'); box.hide(); 50 > val && box.delay(300); animations.animateBox(box.html('You have chosen ' + chr + 'N'));

This is not an answer, is it?
 
Greetings, Programs.
 
Monking @Donald.McLean.
 
Hello, user.
 
@skiwi I sent a canned comment asking for them to explain their change and how it helps. Hopefully they'll edit it to be useful.
 
@skiwi You can't defer indefinitely?
@skiwi Not in my book, no.
 
12:52 PM
@SuperBiasedMan It's kind of a late answer too
@Mast Doubt it
 
Meh
 
@skiwi Late isn't a problem unless they're retreading old ground from other answers. They updated with an explanation now.
@skiwi Actually does the original code here even work? switch(true) seems nonsensical.
 
@SuperBiasedMan Well, it's JavaScript
 
@rolfl: congratulations
 
This question might be better suited for codereview.stackexchange.comJiri Tousek 43 secs ago
 
1:03 PM
@skiwi If you want to completely block Windows 10 updates, set your connection to the internet as "Metered."
 
Yeah but does that really mean you can pass the value you expect to switch and evaluate expressions to try get that value?
 
Then Windows 10 won't download and install them without your permission.
 
@SuperBiasedMan It's JavaScript, anything is possible!
:P
Imagine a self-driving car running on JavaScript
 
Oh geez. Now I know how people feel when Python does it's goofy but useful stuff.
 
@skiwi At least it would always follow the speed limit.
Because it wouldn't know how to exceed it.
 
1:27 PM
@EBrown Forcing all connections to be automatically considered metered is probably doable, that would work.
@SuperBiasedMan import antigravity
3
 
@Mast Well in some cases it doesn't.
 
@Mast also import this
 
I was a bit mistaken, just went and read about it and it works great for Wireless, but on Ethernet Broadband it tends to detect such things and not take "metered" into account.
 
Pffff
 
Which is some serious BS because my dad has metered satellite internet, and it wouldn't consider it metered.
So he's not getting Windows 10.
Also, anyone care to comment on a design issue I have?
 
1:30 PM
So I'll just have to LOIC the entire update module into oblivion...
 
@Mast LOIC?
 
Low Orbit Ion Cannon
 
Ah.
 
So I did the taboo thing and wrotesome code for a user on SO. He is asking questions in the comments now, and I think his most recent one would make a great Code Review question. Can a reputable user of this site confirm?
So I was also thinking , if it would be possible to get rid of this lines of code that mean the same the first part to print and not use a method, so that there is another way to code it. Because when ran my original code i could put a letter and it make me enter again but a negative number would just go into white space, is that because it running forever, should I put another else if in the end of my original code to have it print out "not in sphere " because no negative number would be in sphere? Is that possible ? — Phantom1421 3 mins ago
He now has working code, but wants to eliminate redundancy (without using methods because he has not learned them yet). That reeks of code review to me.
 
@Rainbolt Yup, as long as he is owner of the code and understands what it does.
 
1:32 PM
Well what if I helped him write it?
 
And it's not example/stub/hypothetical code.
 
I'd definitely advise him to write a method anyway in the answer.
@Rainbolt Should be fine, as long as he understands what it does.
 
Which reminds me: I'm done leaving code snippets in answers except for the extremely basic ones.
 
I'm going to send him this way with advice. Thanks for the help guys!
 
@Rainbolt No problem, drop by anytime.
And feel free to drop in to check-up on it's status.
@EBrown They can work out quite well.
 
1:34 PM
@Mast I'm sorry?
 
Snippets.
15
A: Game code optimisation advice

MastWhile reading your code I had one thought coming over and over: Get yourself acquainted with Object-Oriented Programming. Python allows you to build your own classes. Use that to your advantage. Why? It will remove constructions like: def movefunc(direction): global roomnumberint glo...

 
It's bit me in the ass twice now, so I'm done with it.
 
As with most things that you can be done with: eventually you'll get over it.
Give it time and don't rush it.
 
I'll still leave basic ones, but the more complex ones I won't be leaving snippets for, they can build the snippet themselves if they're honestly trying to follow along.
 
Complex is sort of relative. If you are helping a beginner, simple snippets for you are complex for them.
 
1:37 PM
One of my flags got disputed. That doesn't happen often on CR.
It's often clear-cut one way or another.
Perhaps it got handled around the edit...
 
hey-ho
 
@Rainbolt That's one of the hardest things while answering: measuring the expertise of the OP
3
 
I think there was a meta proposal for clearing low quality flags that were cast prior to an edit (or maybe notifying the caster - I can't remember)
 
Greeting everyone.
 
quick computer spec question - or should I ask somewhere else?
Monking @Legato
 
1:40 PM
@Mast I was going to say I almost never have flags declined here but then I realised that 90% of my flags are on obsolete comments.
Hi there folks
 
@SuperBiasedMan Probably same here.
Most of my NAA flags get declined anyway so I stopped flagging them.
 
Tempted to buy this ssd (£60 incudling next day delivery on offer), potentially thinking about an extra 8GB RAM for a x64 i5 setup on ubuntu. RAM too overkill or no? Mainly being used for development with virtual machines etc.
 
RAM is never overkill if you're a programmer
 
@ARedHerring 16GB RAM is nice, especially when using VMs
Or when logging in on multiple computers at the same time.
 
I already have 8GB. Just wondering how nice the extra 8GB would be and if it would be worth the cost.
 
1:41 PM
Or when compiling heavy stuff like massive C++ projects or VHDL
 
If you manage to get your SSD full, then I'd go with a 500GB one if its cost makes sense
(I personally manage to get 250GB full)
 
@Phantom1421 There may be a way to restructure the code and eliminate the redundancy altogether - I haven't really thought about it too much. I think you should ask a question on Code Review. Title your question "How can I eliminate redundancy in my code?" Be sure to post your entire code. Describe exactly what it does. Code Review only allows working code. It is the best place to ask questions about code that works but could be improved. — Rainbolt 10 secs ago
 
@skiwi 250GB is very likely not going to be too much. I have a 2TB HDD storage as well. The 250GB would mainly be for the OS and my code + virt machines.
 
Whoah...
 
Well, another graphics driver problem.
 
1:42 PM
@ARedHerring Libraries tend to suck up space, but maybe that's mostly Java development :D
 
@rainbolt Please don't title it like that. "How to improve my code" is implied for all questions on Code Review. your title should say what your Code is/does. — Zak 21 secs ago
 
@skiwi we have lots of libraries in javascript, but npm dedupes them and are generally quite small.
 
@ARedHerring I always run out of storage so I didn't go for SSD.
 
For reference, my PC is using 6,9GB out of 16GB RAM now and I'm not doing much
 
@skiwi what
 
1:43 PM
Firefox takes 1.5GB for example, IntelliJ 750MB
 
@skiwi That's your 1k tabs.
 
Zak
I could use some naming help:
 
@skiwi I use Chrome and Atom.io and don't have this problem :)
CEF is great.
 
I hate Chrome so deep you can't imagine it.
 
Then Windows 8.1 claims another 3GB which I cannot directly track down
 
Zak
1:44 PM
I'm writing a function to take 2 dictionaries and, for every key in the first, either add it or replace it in the 2nd.
 
I have a bunch of Intel documentation that takes a bit of space.
 
@Zak sounds like merge or mergeWith if you allow specification of a functor.
 
Zak
but I'm having difficulty naming the dictionary variables so it's clear which takes precedence
 
@Zak Can you put something in a pastebin? I'll take a shot at it.
 
@Mast @Zak prefer gist, PB is blocked @ work.
 
1:45 PM
Not that my naming is great, but 2 extra eyes won't hurt.
 
There are 3800 pages in this Intel doc.
 
What do you guys use titles for? Do you see a question title like "Simulate a car driving down the road" and think "Wow, I can really help with that!"?
 
Definitely something merge like
@Rainbolt Yup
The title should indicate what it does.
 
Zak
1:48 PM
@Rainbolt I definitely think "I really want to take a look at that"
 
So Heavy-duty car simulator is a good title.
15
Q: Stop mentioning major concerns in title

Simon ForsbergOn the Ask a Question page, users are currently faced with this: state the purpose of your code, and mention any major concerns. I have recently started commenting on many questions with this comment: As we all want to make our code more efficient or improve it in one way or another, ...

 
@Zak The method could be named AddOrUpdate
 
@Heslacher Isn't that exactly what Merge means?
 
I think this is a question for codereview.stackexchange.com not stackoverflow. — Cosmin 50 secs ago
 
I would understand merge as put everything into it except if it is already in it.
 
1:50 PM
@Mast Merge implies a combination of the two, AddOrUpdate implies a synchronization of the two.
 
^^^that
 
This is no code review site. IIRC, ToH just needs few lines of code. Is google down? — Olaf 9 secs ago
 
Why not call it SynchronizeWith in that case?
 
@Olaf Stack Overflow may not be, but Code Review most certainly is — Zak 32 secs ago
 
@Zak sourceList = dictionary? wut
 
1:53 PM
Zak Because AddOrUpdate is more clear. SynchronizeWith could be understood like in both will always be the same.
 
Zak
How about AddOrOverwrite?
 
@Zak I would personally say make it immutable and stick with Merge.
 
Whats your problem with AddOrUpdate ?
 
Zak
Update to me, means varying things depending on the context
 
This name is already in NET, so anybody with some NET experience will know what is meant.
 
1:56 PM
@Heslacher That's something to take into account, the naming scheme of the language itself.
 
Zak
@Heslacher Ah, I did not know that
In that case, I'll take it.
 
But I did ;-)
Btw, you really should define the return type of the method.
 
Zak
oh yeah, forgot that :)
 
OK, some 2D array still wants to be rotated, so back to work
 
Zak
@Mast @Heslacher @ARedHerring Cheers guys :)
 

« first day (894 days earlier)      last day (3127 days later) »