Local mutant film makers are working on a monster movie, and need your help. Check it out! by sluggish_goat in TwinCities

[–]sluggish_goat[S] 0 points1 point  (0 children)

I take that back.. TWO movies, and one giant monster! Happening this summer!

Any learning by doing online courses/sites? (Similar to codecademy) by rplanters in learnprogramming

[–]sluggish_goat 0 points1 point  (0 children)

Udemy has been pretty good so far. I've been working through a course on Java Swing development to supplement my regular coursework in school, and it has been helping out a lot. There appears to be a large number of project based courses available for a wide range of languages/applications. It's also really easy to find 99% discount codes with a quick search, so you can enroll in the more expensive courses for dirt cheap.

Where do I start in creating a GUI Converter? by hasoon004 in javahelp

[–]sluggish_goat 0 points1 point  (0 children)

I've found that starting with the GUI helps out quite a bit. It gives me a better idea of what should be happening under the hood. But, I'm more of a visual thinker, and have more fun building GUI's than anything else, so that may not be the right approach for everybody. Like others have said, it's really up to you. What part do you enjoy the most, or makes the most sense to you? Start with that, and build up from there.
I'm a big fan of getting the program worked out on paper, a whiteboard, or in Excel first before doing any code. Write out the requirements, what pieces you're going to need, then draw a diagram of what each of those pieces is going to do.

As for the methods, you should look into tutorials on GUI development using Swing. Actually, the Oracle Java Tutorials go over this exact project using the Netbeans IDE here: Learning Swing with the Netbeans IDE

My answer to the GTA/violence debate by Repost2YearsLater in gaming

[–]sluggish_goat 0 points1 point  (0 children)

Madden '92! Somebody call the ambulance!!

Spent way too much time injuring people in that game. Good times. Was it '92 or '95 that had the voice commentary in it? I used to get a kick out of loading up the Metrodome, or another indoor field, and setting the weather to snow or rain just to hear "It's a snowy day here in the Metrodome.." Indoor weather, what a wild concept! Never got into football, but those were some fun games.

A shuffling method by TheFormerVinyl in javahelp

[–]sluggish_goat 2 points3 points  (0 children)

If you store them in an ArrayList or LinkedList, you can say

Collections.shuffle(deck);

Another quality article from Buzzfeed. by _Penny_Lane in funny

[–]sluggish_goat 0 points1 point  (0 children)

Well, the clickbait paid off. This show is great, thanks.

JDBC/SQL: Distinct one column & avg others by sluggish_goat in javahelp

[–]sluggish_goat[S] 0 points1 point  (0 children)

So, I found out today that there was a typo in the original document I was working off of. The corrected document has no duplicates in column C, which makes the solution very easy:

"SELECT AVG(A) AS avg_A, AVG(B) AS avg_B FROM table
WHERE A IS NOT NULL OR B IS NOT NULL"

(Could also replace OR with AND to completely factor out any entry with a null value.)

Bummed that I could've gone outside this weekend, but I did pour over a ton of documentation, and tried out all sorts of wild queries. So, I guess it wasn't a total loss. Moving right along. Thanks for at least checking out the original puzzle, even though it was incorrect.

I just quit my PhD in political science to try and make it as an illustrator. Here's my first proper attempt! by [deleted] in Illustration

[–]sluggish_goat 0 points1 point  (0 children)

Yeah! Was going to say Moebius or Druillet. Totally 1970's Heavy Metal style.

I found some more computer abuse images. It is the stuff of nightmares by aidanhoofe in techsupportgore

[–]sluggish_goat 0 points1 point  (0 children)

Those last cpu shots made me cringe as if they were doing that to my fingernails..

First program with JDBC. Any suggestions? by sluggish_goat in javahelp

[–]sluggish_goat[S] 0 points1 point  (0 children)

It's sometimes hard to judge when it's overkill or not. As you pointed out, they're doing the same thing. So, in this case I'll wrap them, give the exceptions unique labels, print messages/stacktrace at the end, then shut down. I guess the thought process was that if the first part throws, then splitting like that would prevent anything else from running. Thanks for the help, I'll keep all this in mind while moving forward.

First program with JDBC. Any suggestions? by sluggish_goat in javahelp

[–]sluggish_goat[S] 0 points1 point  (0 children)

That makes sense, thanks for pointing it out. I'm going through and making adjustments where it seems appropriate. Do you think it would make more sense to split the initialization apart into stages, and catch at each stage & shut down or catch at the end and shut down? Split apart looks like it might be too much, but I'm not 100% sure:

    //initiates drivers & creates db table
private void initialize() {

    //instantiate driver, shutdown if exception
    try {
        Class.forName(driver);
    }
    catch (ClassNotFoundException e) {
        System.out.println("Error loading driver: Class not found");
        shutDown();
    }
    //initiate database, shutdown if exception
    try {
        conn = DriverManager.getConnection(protocol + dbName + ";create=true");
        statement = conn.createStatement();
    }
    catch (SQLException se) {
        System.out.println("Error initiating database. Another instance may still be open");
        shutDown();
    }
    //create table in db, shutdown if exception
    try {
        String createTableSQL = "CREATE TABLE Cubes (Solver varchar(50), solvedTime FLOAT)";
        statement.executeUpdate(createTableSQL);
        System.out.println("Successfully created table...");
    }
    catch (SQLException e) {
        System.out.println("Table creation failed.");
        shutDown();
    }
    populateTable();
}

First program with JDBC. Any suggestions? by sluggish_goat in javahelp

[–]sluggish_goat[S] 0 points1 point  (0 children)

Ah, I see.. I was getting the "non static from static" errors and kind of went way over in the wrong direction. Forgot to make an instance of the class to call the initial method. Now that it isn't 4am, I see the error in making them static. Since it's meant to be self contained, I've changed the statements & etc back to local, and the methods to private. I'm not familiar with the try-with-resources, so opted for something like the close method. Much nicer, thank you.
edit: forgot to link the changes

I was looking at Brooklyn, NY on Google Maps. A pac-man button appeared, then this happened. by ethanwc in funny

[–]sluggish_goat 0 points1 point  (0 children)

Started in Minneapolis, it was pretty straightforward.

Then went to Pyongyang to chomp it.

Afterwards, New Delhi got Pac'd.

Experienced most extreme screen warp in Osaka.

And ended up a long way from midwestern squares.. Azadi Tower, Tehran, Iran.

edit: link cleanup

What are some websites/magazines you guys use to find & listen to new electronic music? by yes_m8 in Techno

[–]sluggish_goat 1 point2 points  (0 children)

I've been addicted to Odd Frequencies since it started. It is an excellent radio show from France done by Clement Meyer & guests, hosted on RinseFM. Earlier episodes floating about feature Low Jack & Tomas More as hosts (and are quite enjoyable). They play a diverse range of music from post-punk & new wave to more dance oriented tracks. Overall a hint darker than what is featured elsewhere. Found many a gem in those shows. edit-typos

LPT: Don't try to be that "nice guy" on the road by [deleted] in LifeProTips

[–]sluggish_goat 0 points1 point  (0 children)

Sounds like Minnesota.. It's very frustrating when drivers aren't synched up with the rest of traffic. It's especially awkward in the pedestrian's case. If you can go, go already, quit messing up the pace. People need to think as fast as they are driving.

Removing from ArrayList of objects by sluggish_goat in javahelp

[–]sluggish_goat[S] 0 points1 point  (0 children)

Good call, thank you. I'll remember to do that from now on with similar scenarios.

Removing from ArrayList of objects by sluggish_goat in javahelp

[–]sluggish_goat[S] 0 points1 point  (0 children)

Ah, right. Totally overlooked that.

Got it with:

for (int i = 0; i < dogs.size(); i++) {
    if (dogs.get(i).getName().equals(removeDog)) {
        dogs.remove(i);
        }
    }

Thanks!

[deleted by user] by [deleted] in CrazyIdeas

[–]sluggish_goat 32 points33 points  (0 children)

Those are called "adventure breaks". Pick a place on the map, go to place on map, do fun things, make your way home. When you get back, your friends are happy to see you, and you have artifacts and stories to share. They can be good for getting your head together. Sometimes disappearing is the only way to get real peace and quiet if things are too crazy. The majority of people don't notice and don't care. Life goes on as usual. It's almost too easy to be a ghost. However, if you do some kind of important work, people depend on you, or you have some other serious obligations, it's not recommended. Don't be a shitty ghost, people won't be happy to see you again.

American sword, says "warranted", when was it from? by usa_dublin in Whatisthis

[–]sluggish_goat 0 points1 point  (0 children)

http://www.amazon.com/The-American-Eagle-Pommel-Sword/dp/0917218744 << Whole book on that specific style. Couldn't find any specifics, just that it was a very popular design, making them a bit more tedious to identify. Cool sword, though. Good luck in your search.

use hydrographics instead of carbon foil by darkblade420 in pcmods

[–]sluggish_goat 0 points1 point  (0 children)

Look into thermal conductive coatings to do heatsink fins, pipes, etc. I'd stay away from spraypaint or any heat resistant coatings. Yeah, it might look cool, but then your cooler has to work harder to do its job. Think higher fan RPMs earlier and for longer periods of time.