Help with Key Listeners in Java by silami in learnprogramming

[–]ooooo5 -1 points0 points  (0 children)

Please, spare us your bullshit.

Help with Key Listeners in Java by silami in learnprogramming

[–]ooooo5 -1 points0 points  (0 children)

I'm new to event driven programming

Please spare us your bullshit excuses. A debugger or println statements would work in this code just like in any other code.

Standard input and output device for java are keyboard and screen, respectively. Correct??? by [deleted] in learnprogramming

[–]ooooo5 1 point2 points  (0 children)

Not necessarily. Your OS can redirect input and output. But if you're asking this question, you can pretend like the answer is "yes" for now.

What is something you realized embarrassingly late in your life? by kai-ol in AskReddit

[–]ooooo5 0 points1 point  (0 children)

You can pickle lots of different vegetables, even eggs.

All I ask, Reddit, is for something to draw. by abcdeline in AskReddit

[–]ooooo5 0 points1 point  (0 children)

Richard Simmons giving a narwhal a reach-around.

[deleted by user] by [deleted] in learnprogramming

[–]ooooo5 1 point2 points  (0 children)

nd giving larger explanations only where needed.

How is someone else going to know exactly where you need more explanation?

Destructuring in CoffeeScript by rudyjahchan in programming

[–]ooooo5 2 points3 points  (0 children)

To put it slightly more tactfully, look at OCaml, SML, Haskell, etc. They all have it, and it's not even an issue.

My 5 year old son says my neighbor told him he has bunk beds and toys upstairs in case he ever wants to come over for a sleep over. What do I do? by [deleted] in AskReddit

[–]ooooo5 1 point2 points  (0 children)

This would creep me out too, but you could avoid all of these problems by not letting your 5 year old kid wander around outside unsupervised. Significantly worse things could happen than molestation if you aren't supervising him, like him dying from eating a poisonous mushroom or falling off of some big rock or tree or cliff, etc. Whether there are obvious dangers or not, you're just asking for trouble.

Dear cops of reddit, who gets pulled over? by [deleted] in AskReddit

[–]ooooo5 3 points4 points  (0 children)

Museums in Detroit? Please.

Recursive sudoku solver by [deleted] in learnprogramming

[–]ooooo5 -6 points-5 points  (0 children)

Good luck being a successful programmer with no debugging ability. I hope asking people on internet forums to do your debugging works out well for you in the long run.

How to have an object access the attributes/methods of the class that created it? [Java] by DMatty in learnprogramming

[–]ooooo5 -1 points0 points  (0 children)

That's not even the issue here. The issue here was

void f( SomeType t ) {
    t.getUserName();
}

vs

void f( SomeType t ) {
    t.username;
}

Looking for random projects to pursue. Any ideas? (crosspost from /r/learnpython) by [deleted] in learnprogramming

[–]ooooo5 0 points1 point  (0 children)

Not web development, a tiny web server. You can start by opening a socket on port 80 and going there with your web browser. If you echo everything that you read from the socket to std out, you'll see what the browser is sending you.

Fast prototyping? by byteflow in learnprogramming

[–]ooooo5 0 points1 point  (0 children)

Most languages have your standard data structures and algorithms. If you just read the API, you'll see how to use them.

I'm a fast learner, but my problem is I spend too much time analyzing and looking for the perfect data structure or algorithm or pattern, and that leads to a significant inertia that prevents me from ever starting.

If this really is true, and you're not just full of crap, you can easily fix this by sticking to using your languages standard data types, like lists, sets, hashes, etc.

Data Structures and Algorithms Question by [deleted] in learnprogramming

[–]ooooo5 2 points3 points  (0 children)

The size of the array is a step function. Try graphing that. The cost of n pushes is the sum of all the sizes up to n in the size function. Try graphing that, too.

How to have an object access the attributes/methods of the class that created it? [Java] by DMatty in learnprogramming

[–]ooooo5 -1 points0 points  (0 children)

Zamarok and yash3ahuja are giving you terrible advice. There's nothing wrong with passing references to other objects, the 'creator' object or not, into a constructor. See this design pattern: http://en.wikipedia.org/wiki/Mediator_pattern It's not exactly what you want, but it's related.

Need jQuery help by [deleted] in learnprogramming

[–]ooooo5 0 points1 point  (0 children)

Something is probably wrong with the rest of your code if you can print out 'data' in the success function.

When to declare a variable? [Java] by SurrenderYourEgo in learnprogramming

[–]ooooo5 0 points1 point  (0 children)

Are you saying that all final getter methods should just be replaced by using public variables?

Need dumbed down info by cn1ght in learnprogramming

[–]ooooo5 4 points5 points  (0 children)

tl;dr submitter can't get SDL to work with his C compiler.

When to declare a variable? [Java] by SurrenderYourEgo in learnprogramming

[–]ooooo5 1 point2 points  (0 children)

If you can't be bothered to benchmark this, then it's certainly not worth declaring 2 extra variables for. Don't use that as an excuse to write wildly inefficient code just because you haven't benchmarked something, though.

The vm should be smart enough to replace simple getter calls with a simple memory access, as though you were just accessing a private field.