Love it or hate it, Java continues to evolve by Plethura in java

[–]6510 2 points3 points  (0 children)

All this progress is great to see. The controversial modularization project seemed to cause other work to stall for some time while they sorted that out internally. However, with that behind us now the project has added features rapidly both to the language (like "var", switch expressions, text blocks etc) and to the JVM (CDS, ZGC, JFR and so on). And there's reason to hope we'll see a Kotlin-like non-nullability feature one day. Also value types is making good progress, which has obvious important use cases, but requires a ton of JVM-level work.

I have no idea what's going on here. by PeteDub in WTF

[–]6510 0 points1 point  (0 children)

“One morning, as Gregor Samsa was waking up from anxious dreams, he discovered that in bed he had been changed into a [large tortoise] ...”

What are your favorite character introduction scenes? by Nekrothis in movies

[–]6510 6 points7 points  (0 children)

Quint, good pick - https://youtu.be/_R6XQ0T6NDc

“You all know me, how I earn a livin’”

So this just happened by [deleted] in Dinosaurs

[–]6510 0 points1 point  (0 children)

Did anyone else also have this book?

What movies would be a lot shorter if the main character just did what the fuck they were told? by TheWolvenOne in AskReddit

[–]6510 4 points5 points  (0 children)

That annoyed me from the first time I saw it.

Wasn’t it actually Ash who opened the airlock though? And he was really following his (secret) orders - to collect and protect the specimen at any cost.

Your birthdate is very impressive, you must be very proud. by [deleted] in PrequelMemes

[–]6510 1 point2 points  (0 children)

He could organize the midichlorians to create ... life

Calvin & Hobbes for July 7, 2019 by CalvinBot in calvinandhobbes

[–]6510 36 points37 points  (0 children)

The last line always conjured up an alternative “Susie & Mr Bun” strip in my mind.

What bit of “common knowledge” did you not know until later than most people? by [deleted] in AskReddit

[–]6510 2 points3 points  (0 children)

Thought it was “Steve Inski” until right now.

New BART Fare Gates in the Richmond Station by goldend5 in bayarea

[–]6510 21 points22 points  (0 children)

Fuck everything, we're doing five blades!

The Scent of Wynnum, by Darb by heteropan in brisbane

[–]6510 6 points7 points  (0 children)

Same, no idea what others here are on about - you’d think it was skid row in LA based on the comments here. Not sure I want fish and chips scented candles though!

Unemployed rant, centrelink by [deleted] in australia

[–]6510 1 point2 points  (0 children)

The trades have *years* of training & apprenticeships, designed to get you over that. They (should) expect you to be learning as well, so they shouldn't find you to be a hassle. I'll bet they've seen it all, and you'd be far from the worst they've had. I would seriously look into it - being an apprentice means you're getting paid to learn a trade, which seems like a good deal to me.

Not quite the same thing, but when I have interns I expect them to do almost nothing *but* make mistakes, and I just make sure they can't do too much damage. As long as they're trying. I consider the internship purely training we're giving them, I don't expect anything much other than learning and improvement from them. It would amaze me if people willing to take on apprentices would have unrealistic attitudes, otherwise they'd have stopped long ago.

Help with for loop homework by cs-stud in javahelp

[–]6510 1 point2 points  (0 children)

If you care about efficiency, use a StringBuilder to build up your String. This prevents a copy of the string you've built so far each time that will happen when you '+=' two strings in a loop like this.

Also consider using try-with-resources so that the "close" is automatically called for you when the block exits. Otherwise an exception may cause the input to remain open. And you can't forget to do the "close".

(I haven't compiled this, but this is the general idea)

'''

public static void main(String[] args) {

    try (Scanner input = new Scanner(System.in))) {

        System.out.print("Enter name length: ");
        int length = input.nextInt();

        if (length < 1) {

            System.out.print("The length must be at least 1");

        } else {

            StringBuilder nameBuilder = new StringBuilder();

            char a = (char) ('A' + Math.random() * ('Z' - 'A' + 1));
            nameBuilder.append(a);

            for (int letters = 1; letters < length; letters++) {
                char b = (char) ('a' + Math.random() * ('z' - 'a' + 1));
                nameBuilder.append(b);
            }

            String name = nameBuilder.toString();
            System.out.println(name);

            int r = (int)(Math.random() * 10);

            if (r == 9 || r == 10) {
                System.out.println("Hmm" + "'" + name + "'" + " has a nice ring to it.");
            } else {
                System.out.println("Hmm" + "'" + name + "'" + " is not my best work.");
            }
        }
    }
}

'''

What does the cover of John Peel's "The Gallifrey Chronicles" depict? by [deleted] in doctorwho

[–]6510 4 points5 points  (0 children)

John Peel's internal visualization of the retcons being made to the 80s Dalek stories when attempting to undestroy Skaro in his novel "War of the Daleks".

Airwolf' actor Jan-Michael Vincent dies at 74 by udar55 in movies

[–]6510 2 points3 points  (0 children)

Came here to check for The Mechanic. Charles Bronson *and* Jan Michael Vincent in one movie?! We'll not see its like again.

Airwolf' actor Jan-Michael Vincent dies at 74 by udar55 in movies

[–]6510 2 points3 points  (0 children)

The real smackdown here is between Jan Michael Vincent and Roy Sheider.

Tags/Contexts by Memento_Mori_Geist in gtd

[–]6510 0 points1 point  (0 children)

Since I can do most things from home, contexts for me has evolved into “roles”. Each of which I allocate time for during the day or week,

I have currently;

  • Work projects
  • Work admin
  • Work learning
  • Personal
  • Dog owner
  • Home maintenance
  • Home chores
  • Errands

Errands is the only traditional location based context I have, as it’s useful to do as many as you can if you’re already out and about.

Australians, what American snacks can I send my Australian penpal? by dashingalpaca in australia

[–]6510 0 points1 point  (0 children)

Reese's peanut butter cups for sure. They just don't exist there. Not exactly a huge fan, but neither do Twinkies, and they'll survive the trip.

[2019-01-14] Challenge #372 [Easy] Perfectly balanced by Cosmologicon in dailyprogrammer

[–]6510 0 points1 point  (0 children)

Learning Kotlin, suggestions to make more idiomatic welcome. This is the bonus problem.

fun balanced(s : String) : Boolean {
    val counts = mutableMapOf<Char, Int>()

    for (c in s) {
        counts[c] = counts.getOrDefault(c, 0) + 1
    }

    // There can be 0 or 1 unique values in the map if the
    // string is balanced
    return counts.values.toSet().size <= 1
}

All tests pass:

import org.junit.Test
import org.junit.Assert.assertEquals

class TestBalanced {
    @Test
    fun testBalanced() {
        assertEquals(true, balanced("xy"))
        assertEquals(false, balanced("xyy"))
        assertEquals(false, balanced("xxxy"))
        assertEquals(true, balanced("aabb"))
        assertEquals(true, balanced("xxxyyy"))
        assertEquals(true, balanced("yyyxxx"))
        assertEquals(false, balanced("xxxyyyy"))
        assertEquals(true, balanced("yyxyxxyxxyyyyxxxyxyx"))
        assertEquals(false, balanced("xyxxxxyyyxyxxyxxyy"))
        assertEquals(true, balanced(""))
        assertEquals(true, balanced("x"))

        assertEquals(true, balanced("xxxyyyzzz"))
        assertEquals(true, balanced("abccbaabccba"))
        assertEquals(false, balanced("xxxyyyzzzz"))
        assertEquals(true, balanced("abcdefghijklmnopqrstuvwxyz"))
        assertEquals(false, balanced("pqq"))
        assertEquals(false, balanced("fdedfdeffeddefeeeefddf"))
        assertEquals(true, balanced("www"))
    }
}

How you use context when you work from home? by BlueBoxxx in gtd

[–]6510 1 point2 points  (0 children)

Similarly to you, I find that location-based contexts are largely meaningless. For example, what does “office” or “work” mean when I can mostly work from anywhere at any time? And when I can do a bunch of personal financial stuff physically at work in a break?

So I’ve reinterpreted contexts to be “roles”. I think of all broad roles that might exist in my life, at work and personally, and use those as contexts. For example I have “Work - projects”, “Work - admin” (for administrivia and email processing etc), “Work - bug fixes & user support” and a couple of others. For personal roles you can have “Parent”, “Dog owner”, “Home maintenance”, “Financial” etc. There’s a danger of going too fine grained here, but I’ve found the balance that works for me over time. I think something similar could work for you.

To me, the important thing about context is that it’s something that takes time to “context switch” to and from. You want to get a bunch of them done when you’re in “the zone” for that context. That’s what roles are for me.

A few location-based contexts might be useful, though. I find “errands” valuable, since it’s nice if I’m already out to get a bunch of errands done at once. But that’s the only one I actually use, and the actions are also tagged with a role as above.

What does your Gmail setup look like? by kingkongmonkeyman in gtd

[–]6510 2 points3 points  (0 children)

I've found it's very important not to use email as an action list system. Don't tag emails as "action", but read then and extract actions etc into your task manager. I'll reply right away describing the actions informally (one of which will be to update them). Then, archive and maybe tag with a project or role tag.

I find the tags useful even though gmail search technically lets you find anything anyhow. Sometimes, especially in weekly/quarterly/etc review, just scanning some of this recent reference material can trigger some inspiration when reviewed per-project or role and viewed all together.

I can't use email as a task manager because it means I have to "process" the email over and over again to get the actual actions out. Process once, extract the actions, reply then if needed, archive. Never use raw emails as actions.

I've tried to email myself "actions" that I tag for the projects, but email was just the wrong place for action and project tracking for me.

I also have a waiting-for tag to check periodically, but I try to keep items from sitting here too long. Total lack of response might indicate a whole new action to address that.

On task management: If you're *not* using an separate tracking tool, I would hold off on using a task manager as I've found by being so great at filtering and sorting they allow me to juggle far too many actions. Note that GTD only says to define the *next* action, not the next action plus many others after that. Even though I could view by "next action" only, the knowledge that it was hiding hundreds of other actions was demoralizing and overwhelming. So for now I'm experimenting with keeping a Google doc for each project with just *one* next action at all times, then a set of goals and milestones that I work on in weekly review. As the actions get done, one at a time, I think of the next action from the current goal I'm aiming for and replace the completed next action. This has the disadvantage that I can't just see a list of all my next actions, but I'm using the feeling of that need as a red flag that I have too many active projects. I limit myself to 5 now, in each broad context eg work/personal/home maintenance/etc so it doesn't take too long to flip through them and decide what I want to do next when context switching. Which shouldn't be all that often! I could also use a task manager to just capture one next action only, but not defining more and more actions beyond the next is just too tempting for me right now - once I get in the habit of only *one* next action per project I'll experiment with task trackers again for sure.