« first day (1711 days earlier)      last day (3288 days later) » 
00:00 - 18:0018:00 - 00:00

user55340
12:01 AM
The guy asking about the Java div 3 method this morning... I really wanted to post a comment with: public void div3(int start, int end) { IntStream.rangeClosed(start, end).mapToObj(v -> v % 3 == 0 ? v : "").forEach(System.out::println); } and ask if that helped.
 
user55340
12:12 AM
Could a mod please: remove the tag (5 questions), delete the post that was about to get deleted ( programmers.stackexchange.com/review/low-quality-posts/103587 ), and remove the "We're looking for long answers that provide some explanation and context" mod notice from programmers.stackexchange.com/questions/46252 - a historical lock isn't inappropriate but we should finish the cleaning that was underway when it was locked.
 
[Wonders why anyone would go to the trouble of implementing the IEnumerable<T> interface in a class, when it's much simpler just write a method that returns an IEnumerable<T>]
 
12:24 AM
@MichaelT I asked him to lock that, I didn't know you were in the middle of messing with it.
 
user55340
@durron597 Its not a bad lock... just that there were a few open reviews and... well... that answer is crap. Other answers are crap too, but they weren't up for VLQ reviews.
 
@MichaelT I'm sure @ThomasOwens will be around to take care of it tomorrow.
 
user55340
Also, if we're going to try to get rid of the zone tag, its easier to that when you don't have to remember to go after locked posts.
 
@MichaelT You could add it as an answer to the STCI post.
 
user55340
@durron597 since there are only 5 posts, its almost as easy to finish them off ad hoc.
 
12:27 AM
@MichaelT I know but if a mod needs to get involved...
 
user55340
The only open one has 4 close votes at this time.
 
You could also just flag the locked one again, right?
Oh, you can't flag historical lock questions, huh.
 
user55340
I would of if I could.
 
@RobertHarvey Are you still around to put the 5th vote on ^^^?
 
user55340
@durron597 he got it.
 
12:31 AM
That question is a mess anyway. Who disagrees with quiet time for coding? Other than the "open cubicles" folks, nobody.
 
@RobertHarvey My boss's boss wants us to be nearby, but he's super loud especially when on the phone.
It's more important to be nearby than to have quiet time to code
 
user55340
I've got a cube, but the place can be easily overheard... and there's a project manager who sits on the other side of the major aisle from me who has a very...projecting voice. I have to wear headphones when he's talking.
 
Working with generics, I always wind up being too generic. I separated my BinaryTree class into a BinaryTree<K, V> and a Node<K, V>, but now I can't new Node<K, V>() from the Binary Tree because it doesn't know the actual type.
So now it looks like I'm going to have to do Activator.CreateInstance(TypeOf(K)) and Activator.CreateInstance(TypeOf(V))
No, that's not going to work, either.
 
that is .Net?
 
Yes.
Hmm, looks like a Factory method in the Node<K, V> class might work.
        public static Node<K, V> CreateInstance()
        {
            return new Node<K, V>();
        }
It compiles, anyway.
 
12:43 AM
Can't help much, never coded anything with .net
 
And another one for the other constructor:
        public static Node<K, V> CreateInstance(K key, V value)
        {
            return new Node<K, V>(key, value);
        }
 
Out of CVs 0044 UTC. Nice.
 
Egad, that's so much boilerplate.
Ah, crap. It didn't work anyway. The Type Parameter chased me all the way back to the BinaryTree class.
 
user55340
@Snowman you know you need to try your hand over on Code Golf...
 
user55340
94
Q: Do you want to code a snowman?

Calvin's HobbiesHere is a simple ASCII art snowman: _===_ (.,.) ( : ) ( : ) Let's make him some friends. This will be the general pattern for our ASCII art snowpeople: HHHHH HHHHH X(LNR)Y X(TTT)Y (BBB) The leading spaces and the parentheses are always the same for all snowpeople. The different letters r...

 
12:53 AM
I approve of this question. — Snowman May 7 at 4:42
 
user55340
@durron597 he still needs to do some golfing.
 
user55340
btw, you saw the name of the first storm of the season?
 
@MichaelT ?
 
user55340
cnn.com/2015/05/10/us/tropical-storm-ana - I wonder if the 5th is going to be Elsa.
 
I have no fsking idea how to do it.
 
user114359
1:12 AM
@MichaelT No way. I am a fan of the programming puzzles but not code golf. The only way to compete is to learn an esoteric language that exists solely for golfing and is so mind-bendingly terse and convoluted that it makes Perl blush.
3
 
user55340
@Snowman I look at it as competing within each language rather than overall. You can post C# and golf that. Just because it isn't on the leaderboard for shortest overall doesn't mean that it isn't a good golfing.
 
user55340
You could even write it in Haskell if you wanted..
 
user55340
1
A: Largest and smallest values from concatenated integers

nimiHaskell, 98 bytes import Data.List g=sort.map concat.permutations.words h i=unlines[g i!!0,last$g i] main=interact h Split input string at spaces, concatenate every permutation and sort. Print first and last element.

 
user55340
Look at the leaderboard snippet...
 
user55340
20
Q: Integer mark into grade

TimGiven a positive integer (0 and above, no maximum), convert it into a grade following these rules: A = 100+ B = 90 - 99 C = 80 - 89 D = 70 - 79 E = 60 - 69 F = 59 and less. This felt a little boring, so make the grade a + if it's 7,8 or 9 and a - if it's 0,1 or 2. Ignore this for the...

 
user55340
1:19 AM
Sure, CJam has 33... but they also have entires for ><> (71), C (99), sed (74), Haskell (78), R (99)...
 
user114359
I just get put off by answers like this one:
iii0)?/:0({:'6'(@@+?/'{'01.
;$-o:'4'(?\'7'(?;'+'o
;o'A'\ \'-'o;o'F'\
 
user114359
WTF is that anyway? Sure, Fish is a golf language, I guess it just doesn't make sense to me
 
user55340
Thats one of the children of befunge... which is interesting in that realm.
 
user114359
I can understand some languages like Perl being more concise, but some of these languages are basically "each command is one character and does stuff that Golf challenges need" ending up as incomprehensible gibberish.
 
user55340
@Snowman Oh, let me find that language...
 
1:21 AM
I do see why is fun, but I'm with @Snowman
 
user114359
If the challenge were "shortest program in a useful language" that would make sense to me.
 
user55340
 
@Snowman But Java and C# have a huge disadvantage to, say, Ruby and python
 
user55340
丟낆녬닆묬긅덯댦롤긐
 
user114359
CJam, Fish, GolfScript... it is almost a challenge to invent the tersest language, not to write the shortest program.
 
user55340
1:22 AM
That's hello world.
 
user55340
@Snowman Its getting your mind into that language that is the challenge... not the size.
 
user55340
There are different challenges running in code golf that different people appreciate.
 
user55340
There are some that are doing the pyth vs cjam challenge for given questions.
 
user55340
There are also those that are working in a non-esolang and trying to golf those.
 
user114359
@durron597 Since there can be only one winning answer, they favor those golfing languages.
 
user114359
1:24 AM
See, now my goal is to come up with a golf challenge that those languages have a hard time with
 
user55340
@Snowman That is actually a very worthy challenge.
 
I'd try Sclipting
 
@Snowman I know that; code golf shouldn't have an accept button. meta.stackexchange.com/questions/254175/…
 
user114359
I can understand how golfing in C# or Java is boring but personally, this is my opinion, those golf-specific languages are boring and stupid too.
 
user55340
I like golfing in dc when the problem is applicable.
 
1:26 AM
151
Q: We're no strangers to code golf, you know the rules, and so do I

PolynomialWrite the shortest program that prints the entire lyrics of "Never Gonna Give You Up" by Rick Astley. Rules: Must output the lyrics exactly as they appear in the above pastebin. Here's the raw dump: http://pastebin.com/raw.php?i=wwvdjvEj Cannot rely on any external resources - all lyrics must ...

 
user55340
There are also the KoTH challenges that some people try their hands at.
 
user55340
And I doubt there will ever be a golf language attempt at this one...
 
user55340
53
Q: "KNOT" or "NOT"?

squeamish ossifrageWrite a program that processes an ASCII art representation of a tangled string and decides whether or not it can be untangled into a simple loop. The tangle is represented using the characters - and | to represent horizontal and vertical segments, and + to represent corners. Places where the stri...

 
user114359
@durron597 That is a good one
 
user55340
1:28 AM
I'm still trying to get my head around it.
 
user114359
So do I pay $55 for this or wait it out and pay half price in a few months? Mortal Kombat X - PlayStation 4
 
user114359
THAT is the true issue at hand
 
user55340
(aside, one of the things I do like about the cjam and pyth golfers is that they really do try to explain what is going on)
 
user55340
1
A: Rearranging a set of numbers into order

JakubePyth, 17 bytes uXGhaf>FT.:G2]Z)Q Switching items in a list is really expensive in Pyth. So here's a fun solution, that stretches the rules a little bit. It's probably not valid. Try it online: Pyth Compiler/Executor Explanation First of all, the time complexity of my code is O(n^3). But th...

 
user114359
@MichaelT That is another really interesting one
 
user55340
1:31 AM
Sure, the golf answer is uXGhaf>FT.:G2]Z)Q
 
user55340
The explanation is:
 
user55340
                   implicit: Q = input list
u               Q  set G = Q, update G as long with the following statements,
                   until it stops changing:
         .:G2         all pairs (G[i],G[i+1])
     f>FT             filter for pairs T, where T[0] > T[1]
    a        ]Z       add to this list of pairs [0]
                      (ensures that the filtered list is always non-empty)
   h                  take the first element
 XG            )      translate G by this pair (switches the values T[0] with T[1])
 
user114359
You know what is really interesting? When someone throws a Brainfuck answer into a code golf competition. That is probably the most verbose esoteric language I have seen.
 
user55340
@Snowman I've got a math theory and old scientific american issue and have some starting code on it... but didn't get too far.
 
user114359
@MichaelT hell I'd be interested just to design the algorithm. Almost anything dealing with spatial reasoning can be interesting.
 
user55340
1:34 AM
@Snowman Yep. Oh, for brainfuck, something 'fun' that some people do is write a brainfuck optimizer.
 
user55340
And then there's this one that will make @RobertHarvey's head explode...
 
user55340
15
Q: Convert Fractran into Brainfuck

PhiNotPiBackground Fractran is an esoteric Turing-complete programming language invented by John Conway. A Fractran program consists of an ordered list of fractions. The program starts by taking a single integer as input. Each iteration of the program, it searches the list for the first fraction such th...

 
user55340
FRACTRAN is a Turing-complete esoteric programming language invented by the mathematician John Conway. A FRACTRAN program is an ordered list of positive fractions together with an initial positive integer input n. The program is run by updating the integer n as follows: for the first fraction f in the list for which nf is an integer, replace n by nf repeat this rule until no fraction in the list produces an integer when multiplied by n, then halt. Conway gave an interesting formula for primes in FRACTRAN: Starting with n=2, this FRACTRAN program generates the following sequence of integers: 2...
 
user55340
 
user55340
That's a prime number calculator in fractran.
 
1:37 AM
sweet
 
user55340
It outputs (among other things) 4, 8, 32, 128, 2048, 8192, 131072...
 
user55340
which are all powers of 2... 2^2, 2^3, 2^5, 2^7, 2^11, 2^13, 2^17...
 
user55340
For which the exponent is a prime number.
 
user55340
9
A: Why is FRACTRAN turing complete?

MichaelTFor an imperative language to be Turing complete it must have: Conditional loop Arbitrary number of variables FRACTRAN is a language that is made up of a series of fractions that stores its data in the exponents of primes. Lets say you want to add two numbers: 2a3b becomes 5ab 455 11 ...

 
user55340
Then here's another oddball 2d language... rail: github.com/mtolly/rail - esolangs.org/wiki/Rail
 
user55340
(that first link is a haskell rail to C compiler)
 
user55340
2:23 AM
Two more delete votes on programmers.stackexchange.com/questions/64383/… and four more close votes on programmers.stackexchange.com/questions/103823/… (things I found while poking at )
 
user114359
I was just going through the list of delete vote questions and voted for #1 already. I just added my VTC on #2 right now
 
3:11 AM
How do you create a lambda expression that is consumed by a Func<T> method parameter?
 
 
2 hours later…
5:40 AM
nvm, figured it out.
 
 
3 hours later…
 
 
4 hours later…
12:39 PM
I'm sure it's a subject many programmers are interested in, however that doesn't mean the question belongs here. Unless your app is failing due to a programming error, then it's clearly a service-related problem. — trojanfoe 20 secs ago
 
1:40 PM
Do you think the question would better fit there, meaning that it would not be put on hold? The distinction between stackoverflow and programmers.stackexchange is unclear to me... — jimijazz 17 secs ago
 
user55340
2:20 PM
@amon only 2k more rep until you are a page 1 user.
 
@MichaelT /me is a page 12 user :-/
 
user114359
Page 3 here
 
user55340
You can move through those pages quickly.
 
user114359
20k would put me near the top of page 2. Working on it. Need more "hot questions" to farm rep.
 
user55340
@durron597 400 rep moves up a page. 300 rep for the next page. And 400 for the next...
 
2:28 PM
@MichaelT I just have too much going on right now to write more progs answers.
 
user114359
What to do with this?
 
user114359
0
Q: If we use scrum to plan sprint, how to define user story and task?

user3376741We recently hire scrume master to do scrum for us. After several days' meeting, I am confused about scrum. The scrum master just wrote some notes, like 'As..., I would like to..., so...', and let us give each user story points, like 1,3,4,8,12,30,200,300. I don't know why there are some points li...

 
user114359
Poorly-written, not sure what the question is, and it sounds too broad at the same time.
 
user55340
@Snowman commented.
 
user114359
@MichaelT and edited. Probably not a native English speaker, I am more inclined to help in that case. Some people are bad at English due to inexperience, others are just lazy.
 
user55340
2:38 PM
It's still asking to summarize scrum. Given Wikipedia, that should help as the scrum page is translated into 30 languages.
 
user114359
Which is why I voted as "too broad." We have many questions about scrum, estimation, etc.
 
Its more appropriate to post this question in programmers.stackexchange.com. — Ram 1 min ago
 
okay, job found pending paperwork.
 
that sounds great! @Telastyn
 
@Telastyn Offer already? Dang yo. Congrats!
 
2:52 PM
yeh, turns out one of the best looking jobs on the market for me was that way since one of my old bosses modeled the position after what I did for him 2 jobs ago.
fast tracked the interview process too
 
@Telastyn Nice
 
Networking ftw
 
sweet! :)
 
except this time I actually get the title to go with the responsibility
 
I've finished editing my resume yesterday, will send out resumes today for Canadian employers. Also there is a big dev conference I'm attending soon, will leave some resumes there.
 
user114359
3:01 PM
(moderator closes the question) "I think it is on-topic!"
 
user114359
0
Q: Job interview tasks on readable and well-designed code

FelixCannot you show me some good tasks for job interviews, that will highlight candidate's skills in writing not only working and not even fast, but also understandable and easy-to-use code? I think there should be something like that: 1) Design and implement a class with given functionality in mos...

 
Visual Studio 2013 is hitting a breakpoint during debugging, pausing there for one or two seconds, and then terminating execution. Does anyone here have any idea why?
 
user114359
How many running threads in your program?
 
Just one. It's a console program.
Though it's funny you mentioned threads, because I;m getting thread termination messages in the debug window.
 
user114359
I have had programs in several languages cause problems if I suspend one thread that is interacting with other threads, including crashes. That is why I asked. But a single-threaded program doing this seems odd to me, sounds like a build error of some sort. Like debug symbols are corrupted in the executable maybe.
 
3:14 PM
But doesn't VS break all threads on breakpoint?
 
Do Func<T>'s and their corresponding lambda expressions/anonymous methods spin off new threads under the covers?
Hmm...
The thread 0x116c has exited with code 259 (0x103).
The thread 0x1a00 has exited with code 0 (0x0).
The thread 0x15d0 has exited with code 259 (0x103).
The thread 0xaa8 has exited with code 259 (0x103).
'ConsoleApplication15.vshost.exe' (CLR v2.0.50727: ConsoleApplication15.vshost.exe): Loaded 'c:\users\robert\documents\visual studio 2013\Projects\ConsoleApplication15\ConsoleApplication15\bin\Debug\ConsoleApplication15.exe'. Symbols loaded.
'ConsoleApplication15.vshost.exe' (CLR v2.0.50727: ConsoleApplication15.vshost.exe): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__
What is "Just My Code?" Should I disable that?
 
I suggest you post the question into: programmers.stackexchange.comnafas 21 secs ago
 
user114359
I am not sure, I have not seen this before
 
No thanks, Duga.
 
user114359
Hell I can't even get the VC++ 2013 command line to work. Trying to compile wxWidgets fails hard. I think I have too much crap in my registry or something.
 
3:20 PM
Unfortunately this is the same kind of crap that has dogged me since I started using Microsoft tools 20 years ago. I'd like to think that I wouldn't see this sort of thing in other environments, but I've always used Microsoft tools, so I don't know.
 
user114359
@RobertHarvey I think I'm turning into gnat, pouncing on Duga comments
 
user114359
Adding canned responses
 
274
Q: AutoReviewComments - Pro-forma comments for SE

Benjol No more re-typing the same comments over and over! This script adds a little 'auto' link next to all comments boxes. When you click the link, you see a popup with 6 configurable auto-comments (canned responses), which you can easily click to insert. This script was inspired by answers to thi...

 
Question to broad for StackOverflow. We deal will specific problems/issues here. Redirect you question maybe here: programmers.stackexchange.comAnalystCave.com 12 secs ago
 
3:24 PM
@Duga Batter up @Snowman
 
@AnalystCave.com If the question is too broad here, it is too broad for Programmers. Please read: What goes on Programmers.SE? A guide for Stack Overflow. — Snowman 21 secs ago
@nafas: "Remember that algorithm questions are on topic on Stack Overflow (so you don't need to migrate those)." - Programmers.SE — Xearta 38 secs ago
 
user55340
I'm well out of close votes... Should that ABA regex question be migrated?
 
user55340
I like that it shows Xearta read all of the meta post.
 
user114359
@MichaelT Not necessarily:
 
user114359
@nafas: That doesn't make it off-topic here. Look at the help center; algorithmic questions are on-topic for Stack Overflow. — Robert Harvey ♦ 9 mins ago
 
user114359
3:40 PM
@MichaelT I thought SO existed for "fix my regex" questions?
 
@RobertHarvey - generally, there's some stack overflow in your watch/locals
or similar debugger issue. I've also seen that sort of thing happen when libraries get out of sync. Doing a clean/rebuild sometimes helps.
 
There is, but I thought I breakpointed it at the point before recursion started.
Is it psychic-debugging?
 
right, but to evaluate the watch variable it needs to run code.
 
It's a pure breakpoint; I don't have any watches.
It stops unconditionally.
 
no locals in the little debugger window?
 
user114359
3:49 PM
@durron597 thanks, I installed that add-on.
 
maybe it errors trying to create the string representations of the local variables
 
@RobertHarvey: "just my code" makes the debugger ignore all dlls besides the ones in your project
if you have debugging symbols for the core windows libraries installed, that can make quite a big performance difference
and if you have an optimized assembly, even with debugging symbols, stepping through the debugger is chaotic
 
I noticed.
OK, well it seems that I have an infinite recursion prior to the breakpoint, so the breakpoint is now a red herring. It says that it stops there, but what is really happening is the debugger is crashing.
 
if you want to debug optimized assemblies printf/logfile debugging is pretty much the only way to do it
 
user55340
@Snowman that line that X quoted was the first line of section "so what questions do you want"
 
3:54 PM
Alright, well how do you "de-optimize" the assemblies?
I'm already set to Debug.
 
@RobertHarvey compile from source without the optimization flag
 
go into your project properties > build tab
ensure "Optimize code" is unchecked
err, what version VS are you using
 
44 mins ago, by Robert Harvey
Visual Studio 2013 is hitting a breakpoint during debugging, pausing there for one or two seconds, and then terminating execution. Does anyone here have any idea why?
 
ok, I only have 2010 but I'm sure it's the same for 2013
make sure that checkbox is unchecked
 
"Optimize code" is already unchecked.
Dammit
 
user114359
3:56 PM
@MichaelT Ah, I didn't make that connection.
 
did you start this project from scratch or was it downloaded from the interwebs
 
Started from scratch.
OK, I've got a breakpoint working prior to the infinite recursion.
 
just sprinkle some System.Diagnostics.Debug.WriteLine() calls instead of stepping through
 
So time consuming, but yeah.
And off it goes again... If I could just debug the infinite recursion before the debugger goes off its rails I'd be home free.
 
so, if you place a breakpoint before the first call to the infinite recursion function, it still bombs?
 
4:10 PM
No, it stops there. But as soon as it leaves the bottom of the recursive function, the debugger stops single-stepping and starts executing continuously.
 
you could try creating a global integer, and each pass through the function, increment it and do an if globalvariable > 20 or something, and put a breakpoint in the body of the if
that might be able to halt the loop and let you inspect what's going on
you can do conditional breakpoints and stuff too but those are crazy slow
 
user55340
Conditional breakpoint is essentially reinstrumenting the code.
 
Maybe I could just get a quick visual inspection from you guys? It's not much code.
    public class Tree<T> where T : IComparable<T>, IEquatable<T>
    {
        public T Item { get; set; }
        public Tree<T> Left { get; set; }
        public Tree<T> Right { get; set; }

        public Tree() { Item = default(T); }
        public Tree(T item) { Item = item; }

        public void Insert(T item)
        {
            if (Item == null || Item.Equals(default(T)))
            {
                Item = item;
                return;
            }

            if (item.Equals(Item))
 
and how is it being called?
 
Test harness:
        [TestMethod()]
        public void BinaryTreeTest()
        {
            var tree = new Tree<string>();
            tree.Insert("1");
            tree.Insert("4");
            tree.Insert("2");
            tree.Insert("8");
            tree.Insert("5");
            tree.Insert("7");

            Console.WriteLine(tree.ToString());
        }
Bombs on tree.Insert("2");
 
4:23 PM
lol, I just fed it to VS 2010 and it ran without issue
 
[sigh]
 
@GlenH7 Are you around?
 
lol
 
user55340
Btw, @Snowman ever see the old Twitter image compression challenge?
 
user55340
597
Q: Twitter image encoding challenge

Brian CampbellIf a picture's worth 1000 words, how much of a picture can you fit in 140 characters? Note: That's it folks! Bounty deadline is here, and after some tough deliberation, I have decided that Boojum's entry just barely edged out Sam Hocevar's. I will post more detailed notes once I've had a chance ...

 
user114359
4:26 PM
@MichaelT I vaguely remember that
 
user114359
@MichaelT Nope, I was thinking about something else. Not on any SE site.
 
@whatsisname: This is why "Learn Code the Hard Way" exists. Text editor and command-line compiler; that's all anyone should ever need.
 
err how do you format code in chat
 
I think use the syntax > code
 
There's a Fixed Font button when you paste multiple lines. It indents everything four spaces.
 
4:29 PM
I am not at a real computer, I can try on msvs 2013 in a little bit.
 
err, the code was this:
 
Or just have it be at least four character indented?
 
and I get this output: Creating new right node on "4"
Adding "2" to the right of "4"
Creating new left node on "2"
Adding "8" to the right of "4"
Creating new right node on "8"
Adding "5" to the right of "4"
Adding "5" to the right of "8"
Creating new left node on "5"
Adding "7" to the right of "4"
Adding "7" to the right of "8"
Adding "7" to the left of "5"
Creating new right node on "7"
 
But I expect it is picking up stale dlls somewhere.
 
err the code was this:
public class Tree<T> where T : IComparable<T>, IEquatable<T>
    {
        public T Item { get; set; }
        public Tree<T> Left { get; set; }
        public Tree<T> Right { get; set; }

        public Tree() { Item = default(T); }
        public Tree(T item) { Item = item; }

        public override string ToString()
        {
            return String.Format("{0}",Item);
        }
        public void Insert(T item)
        {
            if (Item == null || Item.Equals(default(T)))
            {
wow that was more difficult than it should have been
 
4:31 PM
Adding "5" to the right of "8" -- Well, that ain't right.
Oh. Looks like the comparison is reversed.
But then, why Adding "5" to the right of "4" ?
 
well, you can at least trace the path of execution from reading the statements
 
Yep, thanks.
Really dislike the way the VS2013 editor handles braces.
 
user114359
@MichaelT there are some really interesting answers to that programming challenge
 
4:46 PM
In the options you can comfigure your brace style a ton.
 
user114359
What would anyone do with a report having 2-4 billion records?
 
user114359
0
Q: Get top 10 and last 10 from a billion records

user1797559I have a report which shows 2-4 billion records. I get the records from oracle to java and push it to an excel report. All this is already done! Now, I also need to add a new tab with top 10 and last 10 records. What would be the best way to do it? Should i use PriorityQueue implementation in j...

 
user114359
Who reads these reports? This many records starts getting into the realm of "if we give a page of this report to everyone in the country..." or "if we stacked the pages we would have a pile X% of the way to the moon." Also, OutOfMemoryError. — Snowman 1 min ago
 
@Snowman scroll down?
 
"All of this is already done!" -- Now someone just needs to sit down and read the report.
Inserting 1
Inserting 4
Creating "4" to the right of "1"
Inserting 2
Inserting "2" to the right of "1"
Creating "2" to the left of "4"
Inserting 8
Inserting "8" to the right of "1"
Creating "8" to the right of "4"
Inserting 5
Inserting "5" to the right of "1"
Inserting "5" to the right of "4"
Creating "5" to the left of "8"
Inserting 7
Inserting "7" to the right of "1"
Inserting "7" to the right of "4"
Inserting "7" to the left of "8"
Creating "7" to the right of "5"
It did exactly what it was supposed to do.
 
user114359
4:52 PM
Also, can Excel even deal with 2,000,000,000 or more records?
 
So it's just a FUBAR debugger, I guess. Maybe it can't handle stack sizes more than 5.
 
user114359
Stack size of 5 is not all that big
 
@Snowman I have files with billions of market updates.
 
Excel specs - Worksheet size

1,048,576 rows by 16,384 columns
@durron597 [having a Carl Sagan moment]
 
user114359
@durron597 I have seen databases with that many records, that makes perfect sense. But an Excel workbook?
 
Since when is Excel not a database?
 
Excel = database at most places.
 
Excel is just short for "Excellent database." Everyone knows that.
 
I've worked in a bank, a huge one, they use excel and access for webpages
intranet ones, webpages, still
 
user114359
Using Excel as a data source for a web page is sort of like stabbing yourself in the eye with a fork. Just because you can do something does not mean it is a good idea.
 
4:57 PM
It seems not that bad.
 
Just add a bit of sharepoint seasoning. It's pretty good.
 
I mean, the excel file is likely more stable than 90% of my usual data sources...
 
it isn't, you had like 48h to create a page with lot's of financial data, that some obscure software provided. So you didn't had much time to convert to something fancier
site would be used for 5 days only
and discarded.
 
I assume when you say "Excel File" you really mean CSV?
 
I'd surely use a relational database
 
5:00 PM
An RDBMS is the right thing to reach for about 99 percent of the time, when you have any non-trivial data storage problem..
 
xls files, open using OLE connector or other ASP 3.0 mumble jumble
 
Yeah, unfortunately, new job seems to want to build a rdbms in nosql...
 
I can't laugh actually, I'm sure that is something my boss would ask to
 
Apparently running mssql in azure costs too much, but somehow building transactions onto nosql isn't...
 
@Telastyn Costs too much performance or dollars?
 
5:02 PM
Dollars.
 
I read somewhere you can use nosql to process gazilions of records, let's ditch MySQL
 
Postgresql is awesome. I don't know why more people don't use it. They'd rather use MySQL.
 
I'm not sure why people use MySQL instead of Postgresql
 
Because it's the M in LAMP.
 
5:03 PM
or store images within the database [sigh]
 
user55340
Part of a classic lamp stack.
 
user114359
Bleh, MySQL. Lacked basic SQL features for a long time, then Oracle tainted it.
 
LAPP doesn't sound that great alright
 
user114359
PostgreSQL has MySQL beat in every way.
 
I mean if you're already using PHP, more bad decisions are par for the course.
 
5:04 PM
@Snowman, nods like twice
I suppose is easier to find a cheap hosting with LAMP stack
than a J2EE with Postgresql or other stack
 
user114359
Needs close votes (I am out)
 
user114359
-1
Q: Business student with desire to become a software engineer

Derek FrankI just completed my first year of university and am working towards a dual degree in business and statistics. I just recently realized that programming is a field that I am very interested in. I taught myself java, python and am working on R right now. I will most likely continue self-studying an...

 
here these solutions cost twice or trice
 
@Snowman Not anymore.
Oded to the rescue.
 
user114359
Sweet, moderators are busy moderating.
 
5:07 PM
@André PLAP is much better.
 
Oded's like A Fistful of Dollars. Wanders into town, rolls his eyes, shoots the bad guy and leaves.
 
@MetaFight Private landowner assistance program?
 
Pretty Leery Acronym Pilfering
 
PostreSQL, Linux, Apache, PHP
 
Ah you had to put that last P on there, didn't you?
 
5:09 PM
You can substitute POO for PHP. Nobody notices.
3
ok. judging from the quality of my posts, I think I might have a fever... I'm gonna go rest a bit. talk to you later!
 
Python or Ruby FTW.
Though Ruby has taken a few knocks recently because ROR doesn't scale to very large userbases.
Facebook uses a PHP to C++ transcoder for their main site. Blew my mind when I heard that.
 
That Hack thingy right? Pretty neat
 
Pretty much a poo to gold converter.
 
@RobertHarvey That's limit hold 'em
 
Rube Goldberg machine for poo. Though I don't think gold is what comes out the other end...
 
5:19 PM
More like Iron Pyrite, I guess.
 
@RobertHarvey Scale is hard; there are few technologies that really do it for a damn and that's because there are fewer developers who can do it. You can't throw a nickel at coding conference without hitting some front-end dev who knows the du-jour language and can hack out simple stuff in JS or Ruby or Python or what have you; but finding someone who can really key up a high-volume distributed transactional data processing system? Not so common. Thus, languages that can do it aren't.
You're really kinda stuck to Java, .NET, C++ for those types of systems in industry; there's other languages that are capable but rarely used (F#, OCaml, etc)
and most java/.NET folk don't even know how to work on such a system- are still doing simple LOB style low-volume stuff with minimal need for understanding concurrency or distribution concerns
 
It's hard to simulate that kind of environment with a single computer, or evan a roomful.
You could spin up some Azure instances, I suppose.
For testing. But that could get expensive.
 
@RobertHarvey simulation isn't the hard thing; the hard thing is knowing all the details you need to be aware of when you start dealing with such things.
simulations will just show most people they fucked up and don't know what they're doing
 
Yeah, but you still gotta prove the thing scales. Anyone can run a profiler.
 
sadly, not everyone can run a profiler...
 
user114359
5:36 PM
@Telastyn Profiling can be hard. The observer effect means profiling itself can make a program run differently, and knowing what parts to profile can be non-obvious and difficult.
 
Stupid error. Can anyone else spot it?
        public void Traverse(Tree<T> tree, Action<T> PreAction, Action<T> PostAction)
        {
            if (Item == null || Item.Equals(default(T)))
                return;
            System.Diagnostics.Debug.WriteLine("PreAction " + Item.ToString());
            PreAction(Item);

            if (Left != null && !Left.Equals(default(T)))
            {
                System.Diagnostics.Debug.WriteLine("Traversing " + Left.Item.ToString());
                Traverse(Left, PreAction, PostAction);
 
user114359
Left and Right aren't defined?
 
@Snowman - sure, but I've worked with dozen of senior software engineers who had never run a profiler before.
 
Output:
PreAction 1
Traversing 4
PreAction 1
Traversing 4
PreAction 1
Traversing 4
PreAction 1
Traversing 4
 
user114359
@Telastyn Sadly that is also my experience.
 
5:39 PM
Profilers always reveal something you didn't expect.
 
Left.Item.Equals(default(T))
 
Tree<T> implements IEquatable.
 
Equatable to T or Tree<T>?
 
Equatable to T.
if (tree.Item == null || tree.Item.Equals(default(T)))
Every Item, Left and Right needs to dereference tree.
Works now, though I think I'm going to take your advice with Left.Item.Equals(default(T))
 
wait, so what is this then if you pass tree?
unused, and you don't have tools to harangue you into making it static?
 
00:00 - 18:0018:00 - 00:00

« first day (1711 days earlier)      last day (3288 days later) »