« first day (830 days earlier)      last day (3486 days later) » 

16:02
Greetings
Anyone want to be a santa and upvote a (deserving) question/answer?
I need 4 of reputation to reach 2k
(Thanks to a few downvotes without reasoning, I'm struggling to get there)
@IsmaelMiguel I need a whole lot more ^^
1283
Lets see what I haven't upvoted from you
@CaptainObvious We really are running out of linked list titles. Though, this code shows that the OP is really lacking with basics of memory management.
@Jamal you can always pad it with spaces, they get through the duplicate-check
Thanks, Santa!
Finally hit 2k!
Gone
2
@Vogel612 I wonder if this code even works, minus the obvious memory leaks.
0
Q: Replace every odd element in array

SchugzI am looking for a more efficient way to replace the below code. The code works by replacing the odd elements of arr into symbols corresponding to the odd elements of arr 0 = '+' 1 = '-' 2 = '*' 3 = '/' 4 = '^' so 12345 would turn into 1*3^5 Code: elements = 1 arr = [1, 2, 3, 4, 5] sym = [...

@Mast All the popular.
Come on Santa, I need 65 more rep for today!
@Jamal How many upvotes in a row in n time will trigger a rollback?
That info is kept secret.
Among employees.
16:29
You are a mod, you probably know a range
I've read about it somewhere
I don't remember where and in what meta
Not even mods are told the exact details.
I don't need the exact details
@IsmaelMiguel 5-ish, unless they are spaced by a couple of hours.
I just want to upvote without triggering a rollback
0
Q: Racetrack in... VBA?

RaystafarianSo, I took a look at the August Challenge and thought, "hey, I should try that" - but given I only really know VBA, I did it in excel. Maybe that's not the intention, but I did it anyway. Experience it on github. First thing to do is create the racetrack - Sub CreateGrid() ActiveSheet.Name ...

16:31
@CaptainObvious He did what?!
@Mast The community challenge in VBA
@IsmaelMiguel That was a rhetorical question.
I read the question. If it works, it's awesome.
Sounds like Excel VBA
16:33
Still working on my version in Python.
I won't do this month
Too boring and overly over-repeated
I saw plenty of similar challenges
@IsmaelMiguel As did I, but I never wrote an answer to something similar to this.
Yeah
But I'm ready for next month's challenge!
@IsmaelMiguel Next month's hasn't been decided yet, they're decided on the last day of the month before.
I know
But I hope it is the one to do something in a language I'm not familiar with
16:37
@IsmaelMiguel You need a challenge to do that?
I don't like the MSDN redesign.
Yes
@EBrown The theme is awesome, the structure is still garbage
0
Q: Improving Processing wrapper library code

Michael ChavI'm making a Python port of Processing. I have included some of the code snippets to give structure of the code. Should I make the code more object oriented? Should I limit the use of global variables? If so, how do I change the drawing context without relying on global variables? import pygame ...

I preferred when the page was 100% width.
I have all this screen real-estate and no websites use them, except the SE chat.
And Wikipedia.
I don't get why other websites don't use it
I think it is because writting boxed websites is easier
16:42
I have a 1080p display and only about 1280px width is ever used, it's irritating.
Some websites only use 960px width.
Half my display is whatever cheesy or blank background they have.
I have 2x 1080p
At home, I have a QVGA screen
(That is, 1280x1024)
Greetings
I just wanted to pop in and say that I'm going to be gone for ~3-4 days. If you need me, you can notify me, I just likely won't respond until I'm back.
Don't worry. Break a leg Have fun!
16:48
@CaptainObvious This is Awesome!
I hope I have fun. I'm going up north to Duluth, Minnesota and beyond. I'm going to stay at Lutsen for a while, and maybe do some hiking.
wish I had Microsoft office at home...lol
@EthanBierlein Sounds fun!
@Malachi Virtual Machines with a trial version?
@IsmaelMiguel I might see if I can do office 365 and see how that works... I already have photoshop that way
oh hey almost TFL
Time for lunch?
16:50
@IsmaelMiguel you still here?
Yup
I just spoke
So, what's not making sense?
It makes sense, my knowledge is just broken and I can't quite reach to your point
I learned C# is a good teacher, but that was more focused on the font style rather than the code.
In your application, the idea of separating the view from the logic isn't a great benefit. I just wanted to mention it in case you took on something bigger.
I was going to make it into a multi-screen configurable thing
The biggest problem you have right now is that your setting form and the program itself are one and the same.
Please review my source: Take a look herepzaenger 13 secs ago
I wouldn't worry too much about the MVP atm.
How would I accomplish that?
@Duga Hasn't that question already been posted on CR?
16:57
Cut the whole code, make a nice class and just call the class on my events?
@Mast You expected a Stack Overflow user to search CR for a duplicate?
1
Q: Custom ConcurrentHashMap for ints

gstackoverflowI've implemented a concurrent hash map for integers. class ConcurrentIntHashMap { private transient Entry volatile table[]; private transient int count; private int threshold; private float loadFactor; private static class Entry { int hash; int key; ...

@EBrown No, he posted it himself
16:58
@RubberDuck Sounds pretty easy
It is.
@Mast I was referring directly to the comment you replied to.
I may try it at home
@Jamal is a Memory leak a non-working condition? in your opinion?
gtg. Just ping me if you have any questions.
16:59
@Malachi Not if the OP expects a Memory Leak.
@Malachi If the bug is not apparent in the OP's tests, it shouldn't be considered broken.
is that something that can be included in a review? I asked Jamal because it's a C++ question
The OP seems to be aware of a memory leak, but wants other improvements.
I think that it is something that can be improved in the code
17:00
14
Q: What to do if the asker's code contains bugs?

PimgdBased on this question: WPF Calculator Code The question's code... works, according to the author. However, I quickly spotted multiple bugs. I know that Code Review is not there for fixing bugs. A single, minor bug shouldn't halt review process, however. But what do you do if there's a consisten...

Memory leaks are bugs
@Jamal there are 2 VTKO's on it right now that I know of
"There's a Meta for that."
But they are bugs that still let the code run
The code works, but it craps itself on it's way
So, no, it is still on-topic in my opinion
I don't mind voting as off-topic, but don't vote UWYA.
17:02
I'm not voting as off-topic
Just so many linked list questions.
6
Memory leaks still allow to produce the desired result
@IsmaelMiguel Maybe a memory leak is the desired result?
@EBrown Maybe. Who knows?
17:04
@Malachi If I click "Close" there can I choose an alternative reason?
@EBrown yes
@Malachi Ah good, definitely not UWYA, more-or-less broken code.
@Jamal You want to Jamalize the question? The English there is sub-optimal
961 results
Only 309 tagged.
Someone has some cleaning to do. :)
Of course only 309 tagged, your link also contains the answers.
2
Still, 471 question and only 309 tagged.
17:09
Does this actually have a memory leak: codereview.stackexchange.com/questions/100709/…?
I see a couple delete methods in there.
The methods are there to delete stuff, but they don't seem to actually delete
That may be broken code
But then again, the code does whatever the O.P. wants, which isn't broken
@IsmaelMiguel Maybe not quite yet, at least while it's receiving close votes and no answers. Perhaps the OP can also be directed to the other linked list questions we already have.
@Duga He removed the SO variant.
@Jamal Alright. Sounds reasonable
@Mast Dang, my flag :(
Was about to post a question on CR, then I found a huge bug in it. D:
17:19
How huge?
Method was named LastNSeconds and one of the lines, was: TimeSpan difference = new TimeSpan(0, 0, previousSeconds); (where previousSeconds is an int parameter).
Essentially, it was named LastNSeconds but worked as LastNMinutes.
So, change the name?
I'd rather fix the method.
@EBrown We got a lot of those questions.
Yeah, sounds like a better idea
17:23
Perhaps we should re-think our duplicate policy.
Because 900 linked-lists makes no sense.
@Mast 471 questions
People don't get much from review of code they didn't write.
4
@Morwenn With that many questions, what are the odds of duplicants?
17:26
@Mast Sadly, that's not really the point.
I know why you disagree and I agree with your disagreement, but we should probably do something.
When is it going to be too much, 2000 linked-list questions?
@Mast Count is not as relevant as percent.
^ That
So as long as the percentage doesn't get too high, we don't care about how many thousands we get?
Frankly, Code Review is different from other SE sites in that a question will almost only ever help the one that wrote it and sometimes the reviewers and a few readers.
So we simply can't apply the same reasoning.
17:30
All answers combined we got a growing database of how to apply coding practices in real life situations.
I thought the whole idea of a Q&A site was to do that.
Code Review isn't a typical Q&A site.
SE = Q&A
Then perhaps Code Review is not fit for the SE format.
Look at PPCG.SE or Puzzles.SE ; those are also different.
It's been long known that not every site on the network fit the SE format.
As soon as we start saying, "this is another <tag here> question, we have 416 other <tag here> questions, thus this is a duplicate" is the moment it's no longer Code Review.
17:33
If we can undeniably prove that a question is a duplicate, we close it as such
If we have 30000000 different linked list implementations, we can't close them as duplicate
Duplicate is only useful when somebody clearly asked twice the same question with almost no differences here.
@IsmaelMiguel Not if I understand correctly.
@Mast What I said is that if the question isn't a follow-up and it is a copy of another old question that he wrote, we close it as duplicate. Otherwise, there's no reason to
If it was copied from another user, the question is closed as off-topic
If he posts it on Stack Overflow, it is closed as off-topic as well
We already have strict rules and enough reasons to close questions.
Being a bit more strict won't harm anyone
But there must be a very good reason to be strict
17:37
@IsmaelMiguel Only invent rules when there are problems which solve them.
@Mast That's what I meant
We don't mark such questions as duplicates for the same reason that most of us upvote questions that look like they put in effort, rather than are helpful to us directly.
If we did, CR would be a very empty place.
Comments/critique welcome.
1
Q: Let's (path) find A Star

bazolaYesterday I found myself struggling with creating an A * algorithm in Java, but this morning I finally figured it out, so I would love to hear what Code Review has to say about it! The goal here is not performance since it was a learning exercise. I tried to make the code and algorithm as reada...

0
Q: Framerate Measurement Utility

EBrownAs part of a project I'm working on, I need to measure FPS. In the past, I would do this within the actual project itself, but recently I've been trying to implement more abstract (and reusable) manners of doing such simple things. So, I built an FpsCounter class that handles all this for me! ///

We are now powering down core network equipment in our NY data center. There should be no interruptions but just in case...
@Mat'sMug Underscore and PascalCase... How can I read it later? — Ismael Miguel 2 mins ago
@IsmaelMiguel what do you mean?
17:41
@EBrown I'm not sure it's calculating the FPS, but it's C# so I'll refrain from comment.
@Mat'sMug _ItsUnreadable
@Mast I know it calculates something. I think it's FPS. :P Empirical data shows that it calculates a value that looks right proper.
How can I read code like that?
@IsmaelMiguel and it's also not what I said
@IsmaelMiguel _useItCorrectly
17:42
convention is _privateField and PublicMember
I think I might be the only one who uses _PrivateMember.
@EBrown yes!
Which doesn't make it right.
It just makes it habit.
@Mat'sMug That sounds better. Still bad, but better
I hate capital letters in names
With all my soul
Though convention typically calls for privateMember instead of _privateMember.
17:44
If it requires capital letters, it needs a better name to do not use capital letters
Both usages are accepted convention
@EBrown I use that for locals and parameters
@IsmaelMiguel types are all PascalCase. Your settings class is confusing.
private member naming conventions... aren't, sadly
MSDN recommends privateMember everywhere. I prefer using the _PrivateMember (or accepted as _privateMember) as the underscore helps indicate more clearly, so that I don't confuse them with locals.
even in the core CLR code, there are multiple conflicting conventions for private members
17:45
@Mat'sMug What do you recommend to do not confuse you?
@IsmaelMiguel simple. name your classes like every. single. class. in. the. frakkin. framework. - PascalCase for all types.
@DanLyons BCL code can't really be considered the guideline atm since MS themself has already indicated there's a lot of cleaning up to do
@Mat'sMug But it's the name of the form :/
and it's wrong
@IsmaelMiguel The name of the form should be Settings.
17:47
^
Or, better yet, SettingsForm depending on which you prefer.
I'd go with SettingsView
Because I would (personally) reserve Settings for the backing class.
Why can't the form be settings and the class be Settings?
@IsmaelMiguel It can be, but it shouldn't be.
17:47
because the form is a class
class Settings : Form
That makes sense
All types are accepted in C#/VB as PascalCase.
You could use a using statement as well. using System.Windows.Forms; and using System.Drawing;.
17:48
and it also confuses syntax highlighting, not just me
I have a lot of renaming to do then?
half your code is explicit namespaces
and this.
But the syntax highligher is broken AF
no. your naming is
StackExchange's syntax highlighter is all ruined
Completelly butchered
17:50
no it's not
How is that even relevant?
1 min ago, by Mat's Mug
and it also confuses syntax highlighting, not just me
The only place where it lacks regarding C# that I recall right now is C# 6 support for a few things
Also, @JeroenVannevel I think you are reading the settings.Designer.cs for some of that.
@IsmaelMiguel because it's expected that class names are PascalCase
17:51
Alright, I will rename it
@EBrown sigh, you're right
if I wanted to be pedantic I'd argue that this.Show() should be base.Show()
Why put these pointless pieces of code in your question
@JeroenVannevel So that you don't have to add controls if you wish to run it.
By this I mean the form
I'm not sure if base has the same effect
Isn't base the whole project?
17:53
@IsmaelMiguel base is the first down-level class.
base is the base class - Form, from which you're inheriting the Show method, among other members
Oh
Then base seems to make more sense
I.e. In your case, this refers to the settings instance, whereas base refers to members of the Form class it inherits.
and that's why I'd just call Show() without qualifying it
Though base won't have any members of settings.
17:54
R# would deem the qualifier redundant anyway
When I get home, I will refactor it and post a new question
try to get the logic out of the code-behind
I don't know what R# is
ReSharper
"Rubberduck for C#" ;-)
17:55
The JetBrains plug-in.
Still don't know
@Mat'sMug In Visual Studio 2015 the built-in refactoring will deem it redundant as well.
Which I don't like at all.
9
A: Tools for format and error checking in your programming language

RubberDuckC# StyleCop (free) It can be run from inside of Visual Studio or integrated into an MSBuild project. ReSharper (commercial) A paid Visual Studio extension (possibility for open-source "community" license though) with a free 30-day trial. FxCop (free) Can be run standalone, but later versions...

I'm feeling so unsafe right now!
    public static void main(String[] args) {
        long pointer = UNSAFE.allocateMemory(16);

        UNSAFE.putInt(pointer, 42);
        UNSAFE.putInt(pointer + 8, 4242);

        int a = UNSAFE.getInt(pointer);
        int b = UNSAFE.getInt(pointer + 8);

        System.out.println("a = " + a);
        System.out.println("b = " + b);
    }
@skiwi It looks UNSAFE
17:57
@skiwi It looks like somebody got weird naming habits.
@Mat'sMug There should be a post with a list of relevant posts
@Mast That somebody might be me ;)
@Mast He is shouting so you can run away
@IsmaelMiguel "relevant posts" as in....??
I feel unsafe in some of our F# code because I changed my syntax highlighting to make mutable variables red ;P
17:58
I just wanted to see this in action :P
@skiwi You're evil.
In a few releases of VSDiagnostics I'll just create a tool that applies all diagnostics on a given code snippet, gives me a summary of the changes and I'll automate it to answer C#-tagged questions on CR
No more work, all the rep
It's weird though that it is in sun.misc.unsafe.Unsafe and not standardized, because every JVM needs to support whatever the Unsafe class supports anyway
@JeroenVannevel My usual answer is: I'd love to see you try :-)
@JeroenVannevel If you do that, you deserve the rep.
18:00
Either getting a downvoted SO post or an upvoted one soon :)
@rolfl Most probably.
@Mat'sMug Example: the post you linked and that post with things about StackOverflow's migration
Oh damn. I'm 45 rep from mortarboard for today.
I'm lost
@Mat'sMug Remember the meta post you linked?
18:02
All thanks to Aaron Bertrand. :)
Oh you just wait. All I need is to be done with my exams and I can setup a server, create a web interface, apply VSDiagnostics on some files (which can be an entire solution or a standalone code snippet), look at the applied fixes/warnings and present the transformed file for download
I've already logged an issue for it!
who am I? where am I? what am I doing here?
You are a mug, you are in front of your computer and you were mugged
@Malachi One of these things is not like the others...
18:04
same user profile link though....
0
Q: Why is sun.misc.unsafe.Unsafe not in one of the default java.* packages?

skiwiIn Java there is the Unsafe class in the java.lang.unsafe package that provides low-level access to operations. Now it seems to me that the JVM needs to support all of the methods available in the Unsafe class in order to be compliant to the JLS, example methods can be found here. My question n...

Will this be downvoted or upvoted...? I don't know quite now
@skiwi -1!
@skiwi Good question. Interesting topic, even for non-Java programmers like me
TTGH!!!!
Visual Studio is throwing a funny error, that doesn't actually break anything...>.>
18:11
@JeroenVannevel It's probably somewhere in the JLS :P
Maybe I should clarify it more though
I'm very unclear as to what you expect to be in the JLS though
It tells us how integers are stored, how overload resolution works and what the syntax looks like
it doesn't tell us anything about what kind of library options should be available
I'm trying to figure that out right now
I kinda expected it to be in the JLS because everything is in there
I think you're misinterpreting what a LS is for
At least: the sun.misc.unsafe library is notoriously unofficial
So just because it is there, doesn't mean it is necessarily a part of the JLS
The JLS doesn't dictate what is available in terms of libraries
I'm not claiming the sun.misc.unsafe is part of the JLS
I'm only claiming that the operations sun.misc.unsafe supports are necessary for the JVM to be compliant to the JLS
But those operations are supported by the JVM
You can work with objects and store data and all that stuff
Unsafe is just a hack to do those things in a different way
18:19
So all I'm asking is why not standardize the hack and make it less hacky
Kind of... yes
But I tried to google it and it didn't put up with an SO topic
Though I'm sure I did read that article at some point... just not recalling it
I happened to read a title about sun.misc.unsafe on my twitter feed yesterday so I searched for it there
There's a talk floating around there that everyone is linking to
"The Secret History and Tragic Fate of sun.misc.Unsafe"
Might be interesting to you
That's one I'll watch today definitely
The number of cases to treat to have an optimal sorting algorithm is n! for a sequence of n elements.
I could make yet another algorithm to generate my algorithms.
18:26
lol
The obvious answer would be "because it's unsafe". — Mast 35 secs ago
@Mast You funny guy!
@Morwenn Huh... that's algorithmception
@skiwi You know, to create my current algorithms, I used an algorithm that converted SWAP macros generated by a Perl algorithm.
But I didn't have to write the real algorithm to generate the macros. In this case, I would have to find/design and write the original code generating algorithm.
> Has computer science gone too far?!!!
@skiwi It's true though, they didn't put it in such a package because they don't want to encourage it's usage.
@Morwenn Maybe...?
Wait until all those algorithms create a holy war
2
@Malachi Phraciseption?
18:48
1
Q: Introsort in Java

coderoddeNow I have this Introsort for integer arrays. Introsort.java: package net.coderodde.util.sorting; /** * This class implements Introsort for integer arrays. * * @author Rodion "rodde" Efremov * @version 1.6 */ public class Introsort { /** * Sorts the entire integer array. *...

0
Q: Monte Carlo Pi with R + Fortran + MPI

IgnacioI created a R package to calculate Pi with a Monte Carlo simulation. My goal is to optimize the parallel function SnowPi as much as possible. This is the SnowPi.R code: FSnowPi <- function(DARTS, ROUNDS, proc_num, numprocs) { retvals <- .Fortran("snowpi", avepi = as.numeric(1), ...

0
Q: Properties File MRU Cache

Thomas MathewI did an attempt to implement a Properties File MRU Cache with a limited cache size which are of the most recently used properties can only be held in. A read miss from this cache leads to a read from the file for that particular property and keep it in the cache until it goes out of the limit w...

0
Q: Duplicate words in a text

Thomas MathewHere is a simplified implementation to obtain the duplicate words in a text using Lamba expressions. public class FindDuplicateWordsInText { public static Set<String> findDuplicateWordsInText(String text) { String[] words = text.split(" "); Set<String> duplicatesRemovedSet =...

0
Q: Improving over multiple complicated piping

Remi.bI am relatively new in Bash, regular expression and stuff. In a directory, I need to read the last line of all the files that contain the word "fitness", and list (on one line and separated with comas) the first element of these last lines (where elements are defined by spaces), whenever the seco...

@CaptainObvious No context whatsoever, not a complete program. VTC stub.
Does this work? If yes, it belongs on CodeReview. If not, what's wrong with it? Does it not compile? Not work on some inputs? What? — Barry 49 secs ago
typedef union
{
    struct
    {
        int oId:13;
        int jId:5;
        int dId:14;
    } fields;

    unsigned int bits;
} KeyInfo;
@Mast Great question, clever code. Upvoted.
You and I have a different idea of what makes a great question it seems.
18:57
Irony? Sarcasm?
Somebody upvoted it.
I did, I said so. It now has two answers....

« first day (830 days earlier)      last day (3486 days later) »