« first day (840 days earlier)      last day (3178 days later) » 

3:05 PM
0
Q: Reducing nesting and number of if/else's in Python flow control

PydermanIn my program, I prompt the user to enter a range of cities (in a spreadsheet), and then a range of review scores, and then make some decisions based on what the user has entered. Since the handling of the both user inputs (both ranges) is common to each, I have combined both into the single func...

0
Q: Find all the primes less or equal than n (with OOD principle and unit tests)

yvetteroweThis is not a novel interview problem but I want to address it with the following points: 1) Implement the algorithm with Object-Oriented design principle. 2) Optimize the solution if there are many continuous inputs. 3) Write simple unit tests (without using unit test framework like gtest, bo...

 
Zak
hello again people
 
@Zak hello
 
If you don't understand some of the phrases and things we say in here, try this:
'Night!
 
Zak
3:29 PM
I can tell I'm going to be hanging out here a lot :)
10
 
:)
 
Monking
 
And I'm out of stars. Must mean I need to pay attention to RL.
 
0
Q: Python: Test if a network is online by using urllib2

Ricky WilsonMy concerns: Is the code pythonic Is the code practical I tend on expanding the usefulness of this script if you guys don't think it's stupid idea. One thing i will implement is command-line arguments by way of argparse. #!/usr/bin/env python ''' Test if network is online by sending and ht...

 
@nhgrif also using git effectively comes down to this as well
 
3:37 PM
wiki entry modified. Programming: the art of eating elephants.
2
 
Feb 3 '14 at 18:07, by Simon André Forsberg
Once you're in The 2nd Monitor, there's no way out.
 
@SimonAndréForsberg unless you eat your way out of the elephant that the 2nd monitor is.
 
@DanPantry and then we'll see you on the main site asking, "does this code make my ass look fat?"
3
 
@Mat'sMug I want that on the back of a t-shirt, with the front having XML tags
 
we all do Dan, we all do
 
3:42 PM
0
Q: Generating a password to save to a .txt file

Finlandia_CHere is my basic password generator which saves your password to a .txt file which you can choose the name of etc. import random import string import os.path #random numbers section num1 = random.randrange(100,999) number_section = num1 #random letters section string.letters = 'abcdefghijklmnop...

 
with the front having a [yet-to-be-designed] CR logo
2
 
@Mat'sMug Shots fired. I hope SE doesn't see that. ;)
 
@Mat'sMug even better.
@EBrown I hope they do
@Mat'sMug I'm going to run out of stars at this rate if you keep saying stuff like that :P
 
@DanPantry Damn son. That'll hurt their feels.
 
...
Wrong link.
 
3:44 PM
yeah, already upvoted ;-)
 
Ya know, I just read over this again and I think the fact that I mention the comments so often really highlights the issue. I barely even looked at the code because I was too distracted by all the comments. — RubberDuck 1 min ago
 
I am excited that I should be getting SO swag soon. ;)
2
 
Thanks, but not why I'm sharing. I find this phenomena really interesting.
 
@RubberDuck Still got a good quote on it, though.
> What a fascinating solution! It seems that for every smart decision you made, you also threw in a poor decision or two.
 
Morning
 
3:45 PM
Monking @EthanBierlein
 
@nhgrif I'd be more excited for CR swag
 
@DanPantry that was 200
And he was right. Now I really get it though.
 
@RubberDuck yeah. original source
 
So... How do we all really feel about doc comments? I shy away from them because they clutter the code.
 
"One reason not to use recursion is that C# doesn't have tail call optimization" - today I learned
 
3:47 PM
But I love seeing them in intellisense.
I'm wondering what the right balance is now.
 
@RubberDuck I think an overview document per module (whatever that module is) is much more valuable than any class-level documentation
But, then again, some documentation is really useful at the class level.... see insert open source library
I definitely don't think it's worth doing that sort of documentation unless you are releasing versioned software
 
I like a <Summary> on the class.
 
yeah, Summary is fine
 
@RubberDuck This is one of the things I do still like about Objective-C over Swift. Because you only really need doc comments in/on the public stuff, and in Objective-C, the public stuff is in the .h. And your actual implementation is in the .m.
 
But I prefer not to write documentation unless its ex post facto
 
3:49 PM
So you can throw doc comments all over the .h and it doesn't clutter any of your implementation.
 
@RubberDuck best is to code against interfaces, and xml-doc the interface, leaving the code uncluttered.
 
So if you're using github I would put documentation in when I'm creating a PR, but no sooner
@Mat'sMug +1 for this (if your language has a concept of interfaces obviously)
 
I think @nhgrif and @Mat'sMug are onto something.
 
You should also document end points if your software has any
 
But I do think doc comments are immensely important.
As a small experiment where I work... people who have "cluttered" their code with doc comments (even in Swift where they have to be mixed in with the actual implementation) get bothered less when they move away from that project and someone else moves onto it.
 
3:52 PM
They really can be. There's an open source api that I will be documenting if I end up needing to use it.
 
"bothered less" meaning the new person on the project is coming to them asking questions about the code less often
 
I tend to stick by the "read tests for documentation" rule, but at the same time, this is not a perfect world. I'm not about to expect someone who has to work a job to download my source and look at the tests when they could just as easy use another library and mouse-over the identifier
 
I can see that.
 
Exactly.
 
This works for languages that have intellisense.. like C#/Vb/C++/anything that uses an IDE. But for stuff like Ruby, Python, JavaScript, Lua - these dynamic languages - less and less people use IDEs so I stick with tests
 
3:53 PM
If you're doing C# and don't want interfaces: create a partial class and define every method as partial. Now you can define the XML docs in the class that specifies the method signature
 
I've just also seen the other side. 20 lines of comment for 5 lines of cod makes it hard to see the tree for the Forrest.
 
@JeroenVannevel Is there any situation where you would not want interfaces but want partial classes?
Except maybe WPF components?
 
For what it's worth, at my work, we only really care about doc comments on things like models, constants, etc. Stuff that gets reused. We don't doc comment our view controllers (unless we're writing the view controller specifically for the sake of inheriting from)
 
Zak
the zombie thing, that started around early 2014?
 
partial classes and interfaces are entirely different
 
3:54 PM
@JeroenVannevel yes, I get that, but you stated if you "don't want interfaces" for the purpose of documentation
 
I tend to document the DAL a bit.
 
oh like that
Sealed classes, for example
 
Like when there's a RemoveFoo and a DeleteFoo.
One is a soft delete, the other hard. Doc that.
 
@nhgrif and one-liners. I don't need to know that the RemoveFoo method removes the foo if the only line in that method is the operation to remove the foo (i.e, adapter classes).
 
Maybe I want a method to take my exact class and not just anything that implements that interface
Just offering it as an alternative
though I've never done it like that myself
 
3:55 PM
@JeroenVannevel that sounds like a smell, but I'm just being a pedant now ;-)
 
Or, params when there's an expectation of a certain value range or something.
@DanPantry I'm from the school of thought that says I shouldn't have to look at the implementation in order to use a method.
 
@DanPantry I still like to document things that seem obvious. Worse case scenario, it's a confirmation that it is doing the most obvious thing. But it could also be that there are weird scenarios... like if you want to document that it throws an exception if it's in use, for example..
 
@RubberDuck I get that, and I am too. But if the method name is RemoveFoo, why does that need documenting :S Surely all it should do is RemoveFoo. Now, if it had nasty side effects like also causing Bar to throw an exception once on a Qux moon, then I would document that
 
Because there's also a DeleteFoo which has slightly different behavior.
 
Fair point.
 
3:58 PM
@Zak November 2013, when we got our CM review
 
Personally I only use XML docs when something happens internally that isn't accurately depicted from the method signature
 
/**
 *   Removes foo
 *
 *   :warn: Throws an exception if foo is in use.
 *
 */
 func removeFoo()
 
Zak
@Mat'sMug thought so
 
That ^ and that ^^
 
I use XML docs everywhere in the C# code because our technical lead isn't code-literate and likes to know whats going on. ¯\_(ツ)_/¯
 
3:59 PM
Okay. I feel like I'm Doing it Right, just maybe not enough.
 
Even if you don't need that warning about the exception, when you add the code doc and don't add that warning, you have documented it as not throwing an exception
 
44
Q: Call of Duty - We're on a mission

Mat's MugThis is a direct reply to Grace Note's recent CR review, more precisely the following part: (emphasis mine) Unanswered Tying in to all of the above is one of the most pressing concerns about the site I had in my own review, which is the gigantic pool of unanswered questions. There are, ...

 
That's an interesting point.
I need to leverage that exception tag more often.
 
Even if it's not an exception (some languages have a throws keyword that makes it more obvious what throws exceptions), if there is any weird behavior, you can document it. And if you don't document any weird behavior, you have documented that there shouldn't be any weird behavior.
 
Zak
let's see if I can get a photo riht this time :)
 
4:00 PM
And if there is weird behavior, your doc comment and your behavior conflict, so you have a bug.
 
Zak
 
@nhgrif +1 for this
 
I like that ideology @nhgrif. A lot.
 
In other words, doc comments are a way of mapping your business rules to the functions that are implementing that logic.
 
Zak
It really is quite a striking transformation
 
4:01 PM
ah, yes - "The Great Revival"
 
The second coming of Jesus Codereview
2
 
lol
3
 
And if you really wanted to, if you've got some 2500 page PDF with all of the business rules all with coded numbers... like "FOO-4158", you could put that rule in your doc comment to find it later. QA or Product owner says you're app is violating "FOO-4158", and now you can simply find where you implemented that business rule.
 
Hmm. Yes. I need to focus a bit more on documenting the interfaces I'm creating.
 
Or better yet, depending on IDE... Xcode supports putting images and HTML links straight into your doc comments with markdown.
 
4:03 PM
Yeah. I use hyperlinks in my comments a good bit.
 
VS lets you browse to hyperlinks... using IE (grin)
 
No. Mine goes to chrome.
Default browser I think.
 
hmm interesting, mine just opens within VS.. need to configure that I guess
 
Of course, every time I open IE it wants me to make it the default though...
 
It's hard to documented things. The best method I've found so far is to force yourself to write the documentation whenever you write a small piece of usable code.
 
4:05 PM
So, I have this super awesome plugin for Xcode...
 
NO IE! I DO NOT WANT YOU TO BE MY DEFAULT BROWSER!
8
 
Zak
@RubberDuck Words to live by
 
@Mat'sMug The interface spam is real. ;)
 
Weird. Mine opens external.
 
4:07 PM
I write a method. Then go to the line before the method and type /// and it turns it into that. I just have to fill everything out.
tab takes me through those place holders
 
@nhgrif Visual Studio does a similar thing, though in the manner of @Mat'sMug image.
 
VS does pretty much exactly that
 
Also, @Mat'sMug, how did you get two rows of file tabs?
 
@RubberDuck You know you can turn that off, right? ^^
 
4:09 PM
@EBrown IDK, I just dragged the browser tab for the screenshot
 
@Mat'sMug But you have two rows of tabs on the left side...I've never seen that before and I'm curious how you did that...lol
 
The best part is, I can add an extra target to my project... so when I compile, it parses all of my source code and can generate a file that looks like this for me:
 
Zak
I'm going to be AFK for a couple of hours. When I'm back, I'll try and get to grips with rubberduck :)
 
(minus those x's with labels)
 
@EBrown good question... lol
@Zak awesome!
@nhgrif pretty sleek. VS can generate a .xml file with all the xml docs on build. then you can use a tool like SandCastle to build a MSDN-like website with it
 
4:14 PM
ugh..
 
-1
Q: iptables script

siliconvalley*filter :INPUT DROP [23:2584] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [1161:105847] -A INPUT -i lo -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT -A INPUT -i eth0 -p tcp -m tcp --dport 443 -j ACCEPT -A INPUT -s 127.0.0.1/32 -i tcp -p tcp -m tcp --dport 22 -j DROP -A INPUT -s 192.168.0...

 
I think if you did it right, you could manage to get it so that when you do build, that document becomes your repo's README.md... but I'm not 100% sure on that
 
I'm being forced to use Monodevelop
Because VS doesn't know how to autocomplete some of the classes and namespaces in Unity3d.
Monodevelop also forces you to use Java braces, which is just evil.
 
@EthanBierlein Monodevelop... I feel you
It's one of the worst IDEs I've ever worked with
 
Agree
 
4:16 PM
s/evil/correct
s/Java/Egyptian
 
huh
as soon as I say that, I find this:
 
well there you go!
 
@Mat'sMug yeah. I like that very much.
 
I just hope it works with the beta version of VS2015
 
haven't been following VS2015... has it released yet?
 
4:18 PM
I think
I'm not sure though
 
Yes. It has
 
@Mat'sMug Yes.
 
I went outside to get some food and just as i got half way to the shop, thunderstorm. Excellent
@Mat'sMug yes
 
@DanPantry You do live in the United Kingdom after all
 
I have a fun story about IE, TFS and VS. Actually, it's not fun. It's not even a story. But if I accidentally type in my home credentials instead of my work credentials for my works TFS (because muscle memory), I have to open IE and clear cookies to be able to log into a different account in VS for TFS.
Its infuriating and makes no sense at all. Why can't I just change my credentials in VS
 
4:28 PM
Finally
 
@DanPantry I am patiently waiting for MS to totally abandon TFS... it's coming. Git is the way of my people.
4
 
what kind of game are you making @EthanBierlein?
 
ugh. I somehow can't seem to stick the TestExplorerControl WPF control into a WPF element host. I must have done something wrong.
 
@bazola isometric building game
Here, let me get a screenshot
Still very WIP
 
nice
 
4:36 PM
I should have some better screenshots by the end of today.
 
you going to have a fixed map size?
 
@bazola Possibly
I might be able to work out a solution with Perlin noise that allows for infinite maps.
But not using Unity3D's built-in Perlin noise
 
i have been looking at chunk loading and unloading for Unity but haven't gotten far into it yet
 
-3
A: Project Euler #1 in Haskell

chosenbreed37Here's my attempt: sum [n | n <- [1..1000], n mod 3 == 0 || n mod 5 == 0]

Needs to go.
 
@RubberDuck VTD'ed
 
4:41 PM
I can view deleted posts but I can't VTD...so peculiar.
 
@EBrown You need 4k to delete.
 
@Hosch250 I see that now, it just seems strange.
 
0
Q: How to remove a forkbomb from the Startup folder?

Ethan BierleinI have an older laptop running Windows Vista, from about 2005, and I was fooling around with it, and decided to make a Batch file and put this in it: %0|%0 I ran this, and obviously, I had to restart my laptop. I decided to be even dumber, and put this in the Windows Startup folder. Now, I ess...

I was being a little stupid
 
Have you tried booting in safe mode?
 
Gotta go, but for the record, found that "gem" using this. codereview.stackexchange.com/… 10k+ link I believe. More people should look at that more often.
 
4:48 PM
@Quill oh, right. safe mode
 
@RubberDuck Except it's 2K+ until we get proper permission levels.
3
 
*duh*
 
Oh. Right.
 
@Quill You can always write an answer
 
@EthanBierlein F8 was it? for safemode?
 
4:50 PM
yeah
 
oh, a downvote
perhaps not then
 
Don't be deterred
It may have been the guy who just answered who downvoted
 
I figured when I saw the rep of 173
and the identical answer
 
Well, I'll be back in a little bit. I'm going to go on a bike ride.
 
Any C#/Java people around?
 
4:56 PM
yeah
 
Is this answer technically correct? stackoverflow.com/a/32158588/2509848
 
@Hosch250 maybe
 
(I'm adding a C# doc article I just found too.)
 
Oh, references! Nice!
looks correct to me
and I'm also VTC'ing as a duplicate
 
grrr gradle where did you put my jar?
 
5:01 PM
if the code works then you'll probably have better answers on codereview.stackexchange.comLÆ°u VÄ©nh Phúc 35 secs ago
 
4 upvotes, 1 down.
 
I have a flag on SO that's been pending for two days...
 
Oh, the one it is being marked as a duplicate of is already a duplicate of something else, marked by @JeroenVannevel.
 
5:18 PM
@Quill Oh, boy! Posting on Super User was fun!
 
0
Q: What is the proper structure for a basic stand alone horizontal menu?

cade galtHere is what I'm starting with. It is just some p tags in a div tag. <div id='mi_control' class='radius_all'> <p id='mi_cover_l' class='menu_bottom small_dark'>Arcmarks &copy; </p> <p id='mi_about_l' class='menu_bottom small_dark'>About</p> <p id='mi_privacy_l' class='menu_...

 
@CaptainObvious seems a bit ... stubby
That's alright, 2 rep never bothered me anyway — Quill 6 secs ago
Did I just make a Frozen joke?
 
5:34 PM
how in god's name is the specification for gradle using goddamn File as args to stuff that processes files??
or rather, the Jar DSL
GRRRR:
 
@Vogel612 Raging against what are you exactly? :)
Maybe I can elp
 
no matter how you look at it, this just looks crap..
destinationDir project.rootDir.toPath().resolve("dist").toFile()
 
What's that?
And mixing the File and Path API, yay
 
the destinationDir of my fatJar
 
(resolve() is awesome though)
 
5:37 PM
^ that
 
0
Q: Making sequence unique with removal records

DanielI'm working on a tool to detect all exact tandem repeats in a DNA/RNA sequence. Part of the algorithm requires finding Longest Common Extension (LCE) values, which although can be computed in constant time, in practice it is (usually) better to use a naive O(n^2) solution. The problem is that DNA...

 
but what langauge is this?
as you're talking about DSL
 
I don't want my jar to be generated under project.root/build/libs/....jar
and it's groovy, since I'm using gradle
which on a related note makes it needlessly hard to build a fat jar..
and the docs are a pain, IMO
 
Ah, now I understand more
 
Ugh, a user answered the same thing as I was writing 30 seconds before I did
and it's mostly the same thing
 
5:42 PM
@Quill they have pictures, though.
 
@Vogel612 Different question
 
What's the problem, @Vogel612?
 
and I was first for the one you're thinking of
 
@SimonAndréForsberg there is no problem aside from hellishly ugly code..
7 mins ago, by Vogel612
destinationDir project.rootDir.toPath().resolve("dist").toFile()
 
what does the resolve do?
isn't that the same as new File(project.rootDir, 'dist') ?
 
5:44 PM
had a long discussion with fge about that, and must admit to not knowing..
and yes it seems it is..
 
0
Q: Python GUI for US ARL Dshell - Basics

IanI'm working on a Python 2.7 GUI for this program The GUI code is as follows: class frame(object): pass class Dgui: def __init__(self, root): root.frame def Button (): Button.frame = [] ("Decompilers",1), ("...

 
Gotta like my naive self
interface ServerInterface {
    void sendMessage(String message)

    String receiveMessage()
}
Looks okay, right?
Only to realize that receiving messages does not work that way
 
then I would use new File(project.rootDir, 'dist'), which is a whole lot cleaner.
 
yeap...
need to write some tests anyways, soo..
 
I've really not written Java/Groovy in a while, it shows
 
5:49 PM
can't have my coverage dropping by .9 because I implemented locale switching
 
Unfortunately, my coverage is 0.
That really, really bugs me, but I'm too lazy to write a testing framework and such.
 
@Hosch250 So it can't drop? Great!
 
shame on you, I got 40% ...
@Hosch250 why would you write a framework??
 
Well, actually, I have no idea.
I can't really test my VM because everything is self-contained and private.
I'd have to make calls to the commands.
 
0
Q: First SO chat message in Haskell followup

catgocatI have wrote an application which asks for the user id, and returns a link to the first available chat message.. Output Enter user id: 322395 Fetching data... http://chat.stackoverflow.com/transcript/17?m=231895#231895 Source code module Main where import Network.HTTP (simpleHTT...

 
6:01 PM
@Hosch250 what about blackbox testing?
 
Huh?
You mean testing my model?
Basically, I would have to load a file into the C# XML thing and compare the output tree against something.
I could simulate adding/changing items by mocking up a gridcell, or whatever they are called.
 
hola mi amigos
 
I don't do it any different...
hola Ethan
 
Thing is, I'm terribly lazy :(
 
Zak
style question: If I have variables that are only going to be used once, in say a 10-line space, is it okay to dim them at that point in the code, or should they go with the rest of the variable declarations at the beginning of the sub?
 
6:17 PM
In C#, I'd just create them there.
 
@Zak I'd say declare it at the top of that 10-line space.
 
In VBA, I have no idea.
 
But not in the middle of it.
 
Zak
Cool, thanks
 
In C#, I'd just create them the line before it is used in as tight a scope as possible.
 
6:19 PM
@Zak You shouldn't declare all your variables at the beginning of a method.
 
@Zak what EBrown said up there
11
A: Importing data from an external EXCEL-Sheet

Mat's MugThe indentation in TelekomRechnungEinlesen makes it hard to tell where it starts and where it ends. Sub and End Sub define a scope - anything in between should have a Tab: Sub TelekomRechnungEinlesen() Dim lastSetTelekomRow As Long Dim lastSetNovatecRow As Long Dim iterator As Long...

^ see also here
anyways I'll be off for a while, watching fireworks :D
 
@Zak as close as possible to their use. Think of it this way, every line of code in between declaration and use is an opportunity for something to go wrong. Minimize the distance and you reduce the chances someone will change an expected value.
 
Zak
Cool. New question. Is there any reason NOT to use "Call" ?
 
@Zak It's archaic.
It's only noise, anymore.
 
Zak
6:29 PM
I just ask because I do it automatically and I'm trying to decide if there's any payoff to breaking the habit
 
Zak
I think I'll just stick with it.
 
6:52 PM
> Use of the Call keyword for other uses isn’t recommended.
 
I think I did something wrong
Now it just looks like an explosion
I swear, Perlin noise can generate some cool stuff, but it's so difficult to work with.
 
0
Q: PHP method to load files or directories based on type

Mo FriedrichI am building a config class for php which initially loads all given config files. To add files, users should be able to provide either a single file or a directory where files can be JSON or PHP. Below is what I have so far, but it seems sluggish and inefficient to me. Is there a more elegant ...

 
Wow, 73 rep on that SO answer - 6 ups, 1 down, and an accept.
That is the best I've ever done.
 
Cool
I actually asked a good superuser question
Or maybe people find it funny
 
7:20 PM
0
Q: Find the perfect numbers within the range of 1 and a chosen number

MaryMy program is complete and working, but I would like second opinions on it. The program prompts the user for a positive value that will serve as the maximum for the range that will be checked for perfect numbers. Although this is one of those do-what-you-want-with-it problems, I have to keep the ...

 
@CaptainObvious using namespace std; detected!
 
@SimonAndréForsberg Oh joy, now am I or am I not going to write a review...
 
@Mast do you have anything to say in addition to using namespace std?
 
Well, he doesn't have input validation for starters. And system("PAUSE"); is frowned upon by many.
 
7:35 PM
then review
 
Is an underscore a valid variable name in c++?
 
@EthanBierlein Yes.
Identifiers in C++ must start with either a letter or underscore, and can contain any number of letters, numbers, and underscores.
 
Pretty much the only thing invalid is starting with a number.
 
Is stdafx.h MS-specific?
 
No.
It's a pre-compiled header.
If you're writing a review on the latest from CO, I'm covering that.
 
7:43 PM
okay
I'll get rid of it, since I don't know much about C++ anyways.
My answer is short.
 
@EthanBierlein It's auto-generated by Visual Studio.
 
Zak
ah C++ . I remember (about 15 years ago) my dad wrote me a little script to print all the numbers from 1 to 2^n by their binary factors. (E.G. Sheet "2^0": 1, 3, 5, 7, 9 ...; Sheet "2^1": 2, 3, 6, 7, 10, 11...)
It was all well and good until I asked the pc to do everything from 1 to 2^60
 
@EBrown Not if you start an empty project, which he should've done.
@Zak That could take a while.
 
Zak
I don't think 6 year old me appreciated that 2^60 is a BIG number :)
 
Lol.
 
Zak
7:49 PM
It didn't SEEM like it should be much bigger than 2^20
 
LOL.
 
@Mat'sMug or @JeroenVannevel are either of you around?
 
Just 2^20 * 2^20 * 2^20...
 
Zak
needless to say, the computer crashed
I think I actually did something permaent to it
 
7:51 PM
@JeroenVannevel Can you advise me on a constructor situation?
 
probably
 
Zak
because I don't remember ever seeing it working after that
 
@JeroenVannevel Here's the file: github.com/EBrown8534/Framework/blob/master/…
I'm just curious what I've done wrong in the constructors there.
 
0
Q: Bean Machine Simulation

LegateI could not find a solution from my book's website (student-level access) but I feel that I am missing something that I'm supposed to learn from this exercise. Instructions: Balls are dropped from the opening of the board. Every time a ball hits a nail, it has a 50% chance of falling to the left...

 
@EBrown They look pretty good to me.
Is something wrong?
 
7:53 PM
@Hosch250 I feel like something is, but I can't tell.
 
Is it working fine?
 
It seems to be, I just think there is more there than there should be.
 
Looks fine to me.
 
As you can see by the comparison, the original was significantly worse. :P
 
You need optional parameters and jesus in your life, son
 
7:55 PM
Obviously.
 
@JeroenVannevel LOL
 
I'm ingame right now but you can look it up already to know what I mean
optional parameters would help you a lot
 
I know what optional parameters are, I'm just trying to copy the API from this MSDN bit as much as possible. I'll see if I can minimize it down a bit more, though.
Should I rewrite them all into one constructor then?
And make all the parameters optional?
That complicates things, but I'll give it a whirl.
 
Zak
Question, how do I "Follow" specific tags?
 
@Zak Hover your mouse over the tag. Click "subscribe". You should receive an email asking for confirmation.
 
8:02 PM
@EthanBierlein Forgot about that.
 
0
A: Find the perfect numbers within the range of 1 and a chosen number

MastThis will be a list of things I noticed without looking at the bigger picture. Includes and namespaces You include stdafx.h, which is a precompiled header. In your case, there is no point in keeping it around and probably included by default by your compiler. It does have a good reason to exist...

It's hard not to write complete data dumps in answers and only provide that what you expect they need for the next step.
 
Nice job, @Mast.
 
@Hosch250 Thank you.
 
8:32 PM
-1
Q: Jquery dialog error: attempted to call method 'open'

Codepen is betterI'm getting this error: Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'open' I'm running this function: function run_modal( href, url_data ) { $( "#dialog" ).dialog( "open" ); } This is my HTML (stripped of PHP): <div id='dialog' title='B...

0
Q: C++ Using class instance across multiple functions?

DzzsSo I've just stumbled upon something interesting that 'might?' be a solution to a question I have. First my question is how can I use the same instance of a class across multiple different functions? Example say I have a name string that was set with a class method inside of main. Then I need to...

 
Questions like this might be better on codereview.stackexchange. — javac 32 secs ago
 

« first day (840 days earlier)      last day (3178 days later) »