« first day (880 days earlier)      last day (3138 days later) » 

12:00 AM
RELOAD!
 
Tonight's regularly scheduled INTERRUPT has been cancelled to underfunding. Please send your SSN, bank account number, address, and full name to any Nigerian prince to keep the program funded.
2
 
There are 1550 unanswered questions (94.3412% answered)
 
@EthanBierlein Do you write these down and copy paste them from a list every day?
 
Long ones yeah
I came up with that one on the fly though a few minutes ago.
 
@EthanBierlein Did I trigger that? I can vaguely remember I talked with you about forkbombs a couple months back.
 
12:03 AM
@Mast Nah, that was me being stupid and fooling around with it.
That happened ~2 months after you tricked me into running a forkbomb in the terminal.
 
Can someone help out here? I'm not sure who is correct.
 
I'd say you
 
Aug 24 at 17:05, by Ethan Bierlein
Wow, I've almost gotten +100 rep on Super User today from that question alone.
 
There's too much omitted code for a good review.
 
That seems strongly like an opinion.
 
12:05 AM
I've made up my mind, and cast a close vote
 
Stack Overflow likes brevity, Code Review does not. Adding all relevant code would increase the quality of future reviews. — Mast 11 secs ago
 
I'm going to upvote it though, since I think it can be a good question.
 
Thank you.
 
Once it's fixed.
 
Ugh. I think I need to ask a Programmers question...
 
12:06 AM
Good chance OP is still around, so just keep an eye out.
@RubberDuck Could've been worse.
You could've felt the need to ask a Stack Overflow question instead.
 
Yeah. Could be SO
 
Great minds think alike.
 
If you have a new question please post (assuming it has not already been asked). Answer are not a place for Code Review or other questions — Matt 23 secs ago
 
12:29 AM
No high end pro coding shop would let you get away with code so badly formatted and crunched up and hard to read. All the good places have coding standards for a good reason - maintainability and to ease peer code reviews. Hard enough to study code that's readable. Just because C lets you get away with murder formatting-wise doesn't mean it's wise to do it. I submitted an edit to make it easier to read your code. When everything looks like a dense pack of crunched together mess it's harder to find bugs. And consistency in formatting is also important. Don't format one way then another. — nerdist colony 20 secs ago
 
12:39 AM
monking!
 
Hey @Mat'sMug!
 
Hello @Mat'sMug
 
Howdy @Mat'sMug
 
ding!
 
@nerdistcolony man, where's your Code Review profile? ;-) — Mat's Mug 8 secs ago
 
12:42 AM
@Mat'sMug congrats
Naming is hard:
 
@Mast thanks! .... ....for what?
 
0
Q: What name would be intuitive for this output option?

MastI'm currently writing a command-line application which takes multiple arguments. Among those arguments are input and output filenames, modifiers and an option to choose the output. If the option is omitted the application will use the default. 4 different forms of output are available: Termina...

@Mat'sMug Sorry, reflex.
 
lol
 
You were practicing for microwave or something.
 
@Mast you might want to edit that with example command-line, uh, commands
 
12:47 AM
@Mat'sMug Like python application.py inputfile outputfile option ?
 
yeah
lol, I was going to have foobar.exe in my answer
like..
wait, do you have to name the parameters?
 
Well, you can.
 
python application.py input:foo.txt output:bar.txt ???:terminal
right?
help me out here
 
python application.py input.txt output -t
Where the script itself would see what the appropriate extension for output would be, based on the option
 
hmm
 
12:50 AM
I could even split the arguments
And make it -t for text and -g for graphical
Terminal would always go anyway.
Or -t for text, -g for graphical and -b for both
whatever floats your boat
 
python foobar.py myfile.txt outputname -t -g
==
python foobar.py myfile.txt outputname -b
seems you got your answer :)
I was going to suggest calling it "to" or "as", but that doesn't really play well with such switches
 
@Mat'sMug I wouldn't call that one intuitive, it was just an example
Thanks for your input by the way :)
 
heck, I made an answer anyway (and stole credit for -t and -g ;-)
 
^^
Have an upvote, we'll see what the rest thinks.
One of these days I'll get myself a NamingIsHard® t-shirt
3
 
1:07 AM
eh, I have a whopping 111 121 rep on UX
1
Q: Logical Operator Icons

Mat's MugI'm building a WPF UI for configuring some complex business rules; each rule can have many conditions, so I figured I would include a drop-down list of logical operators so that the user could have the flexibility required by the business case. Basically a rule has a logic and a behavior, and un...

+2/-1 on my first question there
 
+3/-1 ;-)
 
lol
 
Now we're almost tied in rep.
I'm going to savor this moment.
 
lol
 
I have 3 answers, 2 with 0 score. I'm probably not too good at the whole UX thing, not surprisingly.
 
1:13 AM
man, looking at that logical operators question totally brings me back to that last job's insanity
that piece of software was for power users to be able to determine the rules for applying various promotions
 
Reading old questions works just the same as encountering old folders on your computer in that regard.
 
haha
 
agreed
I looked through my old CR questions recently
nostalgia
 
How about looking through class zips and finding detailed steps of projects you don't even remember.
That hurts, because you can remember the fear everything won't work out.
And the stress of meeting deadlines when you have 4 other major projects to get done for other classes as well.
 
yikes
 
1:21 AM
I usually hide those pretty well.
 
I sometimes need them for other classes.
 
They're only in my archive, which I only open in case I lost something I'm sure is in there but no longer on any of my computers. It's a mess.
@Hosch250 I no longer have classes, but that theory applies to code snippets I have around.
You never know when you need to borrow something from an old project.
 
@Mast Yep. I stick those in a repo on GH.
 
Some of the code I wrote can not be published, so I never made it a habit to put everything on GH.
 
@Mast savored it? I got 141 :)
 
1:25 AM
@Mat'sMug Wasn't going to mention it, but I noticed
Ah well, try passing me on Electrical and we'll talk
 
Hmm. I need a new project idea.
 
@EthanBierlein How's Cactus?
 
@EthanBierlein Join RD.
 
@Mast so not happening! :D
 
@Mast Slowing down.
There's not much else I can implement at this point.
I just need to fix a few bugs, and then that's about it.
 
1:26 AM
@Mat'sMug Quite doable, I'm only at 325 there.
@EthanBierlein No open feature-requests?
 
@Hosch250 I wish. I know absolutely nothing about WPF, or the likes.
 
@EthanBierlein code is never "final"
 
@EthanBierlein Absolutely no need to.
 
@EthanBierlein do you know how to calculate cyclomatic complexity?
 
1:27 AM
uh
let me look that up real quick
 
That's Big-O complexity
 
To answer that, no
 
How's your Unity terrain generator going?
 
> Lines of code; easy. just count non-empty trimmed lines; separate comment lines from actual lines with executable instructions.
Cyclomatic complexity; that's probably a job for a parse tree listener. not exactly a walk in the park, I'm not sure how I'd calculate this metric, but it's certainly feasible.
Maintainability index; even harder, requires the above two metrics, and some "Halstead Volume" figure.
Nesting; report how deeply nested the code is.
 
1:29 AM
@Mast I actually got it to produce nice results, but I didn't plan on using it for anything. More of a learning experience.
I got it to the point where the terrain didn't just produce something shaped like a human's rear end.
 
I can see if I still have a screenshot around.
 
@EthanBierlein Drive a standard car over it. If that works, use machine learning to generate a car.
 
I could actually do that.
Unity 5 comes with standard wheel simulations
 
@Hosch250 Can't vote there, but flagged for blatantly off-topic
 
1:32 AM
Give me a sec
It has to upgrade the project version.
 
@EthanBierlein then you're this close to have a Race Track implementation ;-)
 
Oh, that would be awesome. A 3D Race Track.
 
@Mat'sMug Whew, that would be one race track!
 
BTW, I need to study more parts of Roslyn. I just know I'm using the wrong bits for some of my code fixes, and probably some of my analyzers too.
 
1:34 AM
Well how about that, Unity 5 automatically opens up Visual Studio instead of MonoDevelop.
 
@EthanBierlein Smoothen it a little, draw some lines and you got yourself a track
 
That just made my day.
 
My racetrack isn't much more than just some lines either. There's no AI racing it yet since I couldn't figure out the collision detection.
 
I'd be happy to have a 3d box moving around
 
@Mast I think you usually make an array of valid values to check against?
 
1:36 AM
@Mat'sMug Give me a week or two and you can have that. ;-)
 
@Mat'sMug That's the easy part in Unity3D, just follow the tutorial
You start with a globe rolling around picking up cubes IIRC
 
hmm
 
@Hosch250 Probably. I didn't really go for the usual way but started painting instead.
 
Playing around with some stranger algorithms:
 
That still has issues, though, because your car could drive in a straight line through a corner and land on a valid square.
 
1:39 AM
@EthanBierlein Ah, you're practicing with building loopings?
 
I'm.. not sure
This is the code that calculates the y position of a tile:
 
@Hosch250 Make your walls 2 width and you solved that.
 
float cubeHeight = Mathf.PerlinNoise(
	(cube.transform.position.x / (this.noiseScale + noiseScaleAddition))
    * (cube.transform.position.z / (this.noiseScale + noiseScaleAddition)),
	(cube.transform.position.z / (this.noiseScale + noiseScaleAddition))
    * (cube.transform.position.x / (this.noiseScale + noiseScaleAddition))
);
 
@Mast Nuh-uh.
 
Damn indentation
 
1:41 AM
@EthanBierlein Draw me Caradhras.
 
This Caradhras?
In the fictional universe of J. R. R. Tolkien's Middle-earth, Caradhras, also called the Redhorn (the literal English translation of the Sindarin name), and known in the Dwarves' language as Barazinbar, is one of the mightiest peaks in the Misty Mountains. It stands above the Redhorn Gate, the only known surface route through the Misty Mountains between Rivendell and the Gap of Rohan. Along with Celebdil and Fanuidhol, Caradhras is one of the three Mountains of Moria, beneath which the great Dwarf palace of Khazad-dûm was built. Below the snowline, Caradhras is described as having dull red slopes...
 
@EthanBierlein draw me a sheep
 
@EthanBierlein Yeah.
@Mast I guess for your track it would work, but not all the ones I've seen.
 
Only place where you could crash through that, is in the first inner bend because that's not two wide. The rest is too thick to crash through, right?
 
1:44 AM
You can pick up speed each move, you know.
 
You should probably check all entire grids between your old and new location.
That wasn't my racetrack by the way, I just drew that.
That's mine.
 
Cool
Hmm
Let's do this
I'm gonna make a racing-esque game in Unity
 
There's a demo with a car in a sandbox environment. You could use that for inspiration.
 
Now here's the big question
2D or 3D?
 
How much time do you have?
 
1:51 AM
as much time as I want
There's just school and sleep though
 
Do the 3D one with a minimap in the corner of your screen with a 2D projection of your current location and that of your rivals.
Best of both worlds.
 
Hmm
Intriguing idea
Just for kicks, instead of calling it "Racetrack", I'm gonna call it "TaceRack"
 
At least it's unique. That name isn't used anywhere.
Only derivatives.
I should be sleeping, but I'm busy with SciPy instead...
My new job should've started tomorrow, but it's delayed by a month
 
Grr. It really annoys me how Unity3d always sets a new gameobject at a random position rather than Vector3.zero
 
@EthanBierlein Just declare it there explicitly and you're done, right?
 
2:00 AM
Yeah, but it's just a little annoying when I'm creating gameobjects directly in the hierarchy and I have to just tweak the values every time.
 
If you can post working code, you may have better luck at codereview.stackexchange.com. — jaco0646 43 secs ago
 
what the heck...
Why is my car bouncing thousands of meters into the air?
 
27
A: Don't google "google"

Hand-E-FoodExcel, 23 characters Paste this into a cell other than A1 and type your search query into A1. =LEN(A1)/(A1<>"google") For example:

like, seriously
 
oh for the love of god
the solution was to simply change my car's mass from 1KG to ~2000KG
 
lol
so now you know what happens when you drive a 1KG car
2
 
2:15 AM
lol
I'm just laughing so much right now because of this
 
Even a 1KG car should bounce thousands of meters into the air. What did you do, put a helium balloon under it?
@Mat'sMug Oh PPCG, where nothing should be taken too seriously
 
Depends how much torque you put on that 1 KG :)
 
Yea, if you put the torque of a 2000kg engine on a 1kg block, it would probably launch.
It's like strapping a rocket to it.
Talking about strapping rockets to cars...
 
For comparison, a 10KG rigidbody in Unity will only get launched ~30 meters into the air by WheelColliders.
 
2:21 AM
oh yeah
Hmm
I take that back
 
possible answer invalidation by Brian on question by Brian: codereview.stackexchange.com/posts/106182/revisions
 
The 10KG car gets launched over 10000 meters on the second bounce
@Duga what the heck?
Oh god, the Unity3D code examples use Java braces.
 
Greetings everyone.
 
graetings @Legato
 
> Fix your includes

Case matters to a C++ compiler, so when you write #include <IOStream> it is not the same as the standard #include <iostream> even if your compiler and/or operating system happens to accept it.
@EthanBierlein feelin' grate?
 
2:32 AM
Monks for the win
 
#Punbearable
What's the average maximum steering angle on a car? Anyone know?
 
8
Q: Typical Maximum steering angle of a real car

JonnyI'm building a car sim in Unity3D. I'm trying to set the properties of the car to be as realistic as possible. I can't seem to get a straight answer on Google so I thought of asking here. What is the typical maximum steering angle of a normal passenger car ?

 
huh
How about that
I set mine to 60
 
@EthanBierlein You should try that for real, 60.
Only works when you're driving slow.
 
2:56 AM
60 degrees @ 60mph == barrel rolls
 
 
I might have to abandon using WheelColliders, They're just too buggy.
I'm certainly not going to try and though. That's just too much work.
 
Can't you make the wheels rigid for now and see what needs to be done later?
 
Well, yeah, I can freeze x and z rotations on the car, but it produces a non-natural feeling.
 
// todo: make it feel more natural
 
3:02 AM
And if you just freeze Z?
 
jitters on the x axis
anyways, I need to head to bed
night
 
Night
 
night!
~Day() {
    goto bed;
}
 
Evil!
Just return EXIT_VALUE
 
3:17 AM
0
Q: In-memory B-Tree in C++11

Koby BeckerI just wrote a simple B-Tree insertion implementation, and was wondering if anyone can comment / critique on code style, readability, maintainability etc. I tested it with a few small test cases and AFAIK, there are no obvious bugs in this. I"m making extensive use of shared_ptr. I contemplated ...

 
possible answer invalidation by rookie on question by rookie: codereview.stackexchange.com/posts/106178/revisions
possible answer invalidation by JS1 on question by Joh: codereview.stackexchange.com/posts/106104/revisions
 
0
Q: moving the logic for determining if a string is a palindrome

user85763Currently incredibly confused about how I would go about moving the logic for determining if a string is a palindrome from the main method into a method named checkPalindrome? My method should have a single String argument and return a boolean value, but I'm still unsure of how to do this. impor...

 
Anyone still around?
 
nope
 
Ah ok
 
3:26 AM
lol
 
Still thinking of my DBO builder class ... right now I made a create() method that actually feeds the parameters into the builder... and all other methods need for the builder to be created before they can do anything with the object
So would it make more sense to move the logic to create the builder into say the constructor?
 
I'd try to avoid doing all the work in a constructor
 
The constructor should do one thing and one thing only.
 
Initializing the parameters for the object instance? (and making the object obviously)
 
Does your method insert data into your class or does it initialize the class?
 
3:31 AM
The create() method only initializes the DBO builder by passing it the input parameters
Well, maybe that's not really initializing then, since it does put data in it
Guess I got my answer :)
 
A constructor should only initialize. Everything else should get a member function instead.
 
quack!
 
AFAIK
 
sounds right
 
Thanks duckies :)
 
3:36 AM
Stack Overflow is not a code review service. Try fixing the remaining problems yourself before asking someone else to do it. — Captain Obvlious 6 secs ago
 
@Duga nice way to ask for a MCVE
for some values of "nice"
 
@Mat'sMug MCVE?
Moderator Close Vote Excuse?
 
minimal, complete, verifiable example
@Hosch250 lol. almost!
dammit, VS just crashed on me
I'm done
 
@Hosch250 Minimum Concrete Verifiable Example
Or something like that
 
at least I figured out why the Code Inspections window would only be displayable once, and would crash Excel if one attempted to bring it back after closing it
and not only I figured it out, ..I fixed it!
and now all classes derived from DockablePresenterBase are a mere excuse for the IoC container to know which type to inject. Nothing more. And it smells.
but I don't know else I could tell Ninject that IPresenter binds to X when injected in a XCommand, and to Y when injected in a YCommand
46 mins ago, by Mat's Mug
~Day() {
    goto bed;
}
'night @all
oh BTW
2
Q: In-memory B-Tree in C++11

Koby BeckerI just wrote a simple B-Tree insertion implementation, and was wondering if anyone can comment / critique on code style, readability, maintainability etc. I tested it with a few small test cases and as far as I know, there are no obvious bugs in this. I'm making extensive use of shared_ptr. I co...

^^ 2 more votes here and @KobyBecker can talk in chat ;-)
(hi Koby / welcome to the 2nd monitor!)
 
3:53 AM
Can't help there, I saw it in the queue and UV'ed.
Hi, @KobyBecker.
 
@Mat'sMug Can't you award him talking privileges for this room?
 
Sure he can.
 
@Mat'sMug If that took you 46 minutes to execute, you must be a VB dev
 
Anyone interested in getting flags at Programmers? This room is dedicated to flag/crap hunters: chat.stackexchange.com/rooms/26942/programmers-cv-please
@Mast VBA, don't you know.
 
@Mast done
@Mast it hasn't executed yet!
but watch, my browser is closing.................................................... NOW!
 
4:00 AM
Wow, he really left lol
 
0
Q: Simple web form in PHP

E. DeanThis is a simple web form handler in PHP that sends a completely filled web form to a email. I see lots of repeating code. What is the best way to reduce repetition? Is my way of checking for fields being empty good? The "empty()" method seems to also treat "0", "0.0" and similar values as empt...

 
@Mat'sMug Mine too. CLOSED!
 
@Phrancis Nah, he's probably lurking
 
What the heck ... die... PHP has the weirdest syntax
 
Hello! Thanks for bringing me in :-)
 
4:10 AM
Hey!
 
howdy @Phancis!
howdy @Phrancis!
Hi, @Hosch250! Wow, this community is great. Thanks for the edits to my question. Sorry this is my first time posting on Stack Exchange, I'll be more thorough next time
 
We're glad you found Code Review, lots of good people here!
 
Not everyone on Stack Exchange is as friendly as us, but we're glad to help
Code Review is just a small part
'str' object has no attribute 'size' Why not...
I keep forgetting Python has len instead of size
 
4:45 AM
monking
 
Monking
 
5:05 AM
possible answer invalidation by Paul H. on question by Paul H.: codereview.stackexchange.com/posts/106159/revisions
 
5:55 AM
Monking
 
6:10 AM
Monking
The feeling you get when you realize you just wrote 100 lines and it's all boilerplate.
4
And not even all of the parsing is done yet, lol.
 
@Mast :-(
 
In Python, of all things.
 
I hit "rejoin favourite rooms" and it didnt let me join anything (I have 3 rooms starred including this one)
 
I mean, I'd expect something like that in C#...
@ARedHerring Bug?
 
idk
Refreshing my chat seems to have resolved it
that was weird
 
6:24 AM
Oh, yea, sometimes the chat bugs out.
F5 fixes almost all of them bugs.
 
@ARedHerring You're a bit early with that ^^
 
Nope.
In the UK it's 07:30 01/10/2015
 
Yea, but Halloween is what, 28th, 31th?
I don't remember.
It's not a thing here.
 
Hallo'ween starts when October starts. ; -)
 
6:31 AM
But I clearly remember it wasn't on the 1st :P
Ah, so it's more than just one day?
Nvm
How's your Halloween so far?
 
No, it lasts more than one day @Mast
The joke is though that durign October the onyl thing that matters is Hallo'ween
So hallo'ween lasts the entire month
(look at the interest graph haha)
 
0
Q: Are AVL trees equal? - revision 2

Maksim DmitrievRevision 1. This revision on GitHub In addition to the solution itself, I wrote tests for all the possible cases. It seems you have verified all execution paths are covered. You are right. I only covered all execution paths in the class AvlTree In this revision: No Android code ...

 
lol
Heard about that Windows glitch yet? They found the cause: theregister.co.uk/2015/09/30/windows_update_glitch
 
> "We incorrectly published a test update and are in the process of removing it."
HOW
I have automatic updates off, so no I hadn't heard about this
 
Saw it as HNQ on Security.SE or I wouldn't have known either.
>Microsoft didn't – and still doesn't – understand what it is either group places value on. That's okay, Microsoft has deep pockets and it can keep throwing things at the wall to see what sticks. History tells us Microsoft has a one in three chance of getting any given release right, and that's more than enough to keep its coffers full.
 
6:45 AM
I just want them to turn the console into something Bash-like. :(
Then I would be happy
But that would require a huge rewrite and break a lot of windows programs, so
 
Yea, there's a reason I'm typing from my Ubuntu side
Developing Python goes a heck of a lot faster on Linux then on Windows
 
developing nearly anything except for C# is faster IMO
nearly every other language relies heavily on command line tools
or is made significantly easier with cli
 
Once you've set up your dev chain, it goes faster, yes.
Setting up your dev chain is a bit tougher on Linux than on Windows IMO though, but once you're through that...
 
I always found it eas
sudo apt-get install git vim -y
echo "export EDITOR=vim" >> ~/.bashrc
then just install your toolchain - nvm uses an install script from github, somewhere, and it's a oneliner
 
Yea, that's the easy stuff. Getting your C and C++ projects to compile using CMake is the problem
 
6:51 AM
ah, yea okay
I haven't used make much so I can't comment on that
It does look quite complicated
 
Yea, it is.
 
Currently I am able to do this if so then it better fits Codereview — M.kazem Akhgary 35 secs ago
 
I'd argue the given code sample is probably a bit too small for us to give a meaningful review. — A Red Herring 11 secs ago
> Display name may only be changed once every 30 days; you may change again tomorrow
so close
ok ok dont kill me. :o @ARedHerring — M.kazem Akhgary 29 secs ago
 

« first day (880 days earlier)      last day (3138 days later) »