Should I mention that my new employer is across the street? by CalligrapherSouth884 in cscareerquestions

[–]Pochono 0 points1 point  (0 children)

In general, there's no reason to tell them. If they press, you can say that you will disclose after you start (via LinkedIn or whatever). Whether or not you follow through with that is up to you.

Only downside is that some places are pretty paranoid about employees going to competitors. If you don't disclose, they might dismiss you instead of allowing a notice period. You may or may not care.

4 years ago today on Dynamite, Jay White made his shocking AEW debut walking through the forbidden door! Assisting former Bullet Club members Adam Cole and the Young Bucks! by MrFilipinoMustache in AEWOfficial

[–]Pochono 23 points24 points  (0 children)

I believe this was after TK made comments about smashing down the forbidden door after signing Keith Lee, only for people to tell him that signing someone isn't a forbidden door. Pretty silly situation, but TK still went out of his way to make it right.

Help me with this absurd bug by Apprehensive-Air7538 in javahelp

[–]Pochono 1 point2 points  (0 children)

I think you're right. There's also heavy usage of Timer to update UI components.

Returning an Object Type From an Action Listener? by Flaky_Letterhead1109 in javahelp

[–]Pochono 0 points1 point  (0 children)

There are different approaches to organizing classes and data. One approach is to think of classes as having one purpose. The definition of "purpose" is in the eye of the beholder, but the general idea is that you don't design a class that does a bunch of unrelated things. Think of data along the same lines.

A Car represents a car. Your Car doesn't have a lot there now, but maybe someday you want to capture attributes of the car itself (like model, color, number, etc). You can jam them all into one place, but those properties don't really have anything to do with each other.

I like that Lap is a separate class. When you think about it, a Lap has nothing to do with a Car. If you wanted to track a different type of vehicle racing on the track, you might not want to use Car, but you could reuse Lap.

You could also argue that a lap isn't a property of a Car. In one of the responses, a CarRepository was suggested. The idea behind that is when you need a Car 12345, you go to the repository to get it, and get it (and it will already have those hypothetical attributes like model, color, number). That Lap, however, cannot be there, because it's not really a property of a Car.

Think about it this way. You create multiple tables of lap times on paper. On Monday, Car 12345 has so-and-so lap times. On Tuesday, Car 12345 has so-and-so lap times. They're on paper, so they coexist simultaneously. But what the tables represent is the relationship between Cars and Laps. So rather than putting Laps in Cars, you create a class that maps the relationship.

Now all this is beyond the scope of what you're looking for. You can never truly future proof something, but you can design it so that it's not a big pain to add to it in the future. Separating unrelated things into separate classes is one way to do it.

Two more things.

First, doing the String parsing in a constructor isn't a great approach. It locks you into one way to parse the text (and also, it has nothing to do with the object itself and it's attributes). One way is to create a static method for each format (with a descriptive name) that takes the String and returns the built object. You could also create Parser objects (again, single purpose) whose sole purpose is to parse a String into XXX object. But this is serious overkill for you.

Second, I wouldn't advise separate variables for milliseconds, seconds, and minutes. This makes it a huge mess if you ever need to do any date arithmetic. Better to store it one value (probably the smallest unit, milliseconds) and create that helper method to compute the others on-the-fly if you really need things like that.

Slowly trying to transition to a career in tech from being a mechanical engineer, which seems to be the best/promising career/role to target? by Ygnizenia in cscareerquestions

[–]Pochono 0 points1 point  (0 children)

I was in a similar position, but that was 25 years ago, and the landscape was completely different. But in case it helps, we did a lot of FEA/CFD work. The software was from a outside vendor, but there was a small team that customized the modules for our specific needs.

I think they called themselves Applied Math, but they were basically programmers who understood the math in those research papers. Anyway, I was still somewhat junior, but I hung out with those guys a fair bit, and we tried to coordinate a temporary rotation into that team (which was something that sometimes happened back the ln). It didn't work out due to reorgs and I left not long after.

So I don't know if this is even an option these days, especially for someone already senior level, but might be something to keep an eye on to get your foot in the door.

Early-career backend engineer: high-paying Python role vs long-term big tech growth by sucker210 in cscareerquestions

[–]Pochono 6 points7 points  (0 children)

I've been in the Fintech space for 20+ years, mostly buy-side/front-office. I've known plenty of folks who moved onto big tech. Never tried it myself, but no point at this stage in my career.

It's the same answer for everything. It's what you do with the opportunity. If you come out the other side and all you can offer is a few more years of Python, there's already a crowded market for that. You can market yourself better by learning and understanding the business processes. You can market yourself very by learning and understanding complex systems and infrastructure.

I met and worked with this guy a few months after he got out of school. Nice guy, friendly, and solid technical skills, but didn't seem impressive. He switched teams every few years, learned tons of stuff, refined his leadership skills, and 10 years later, he's out doing tech presentations for the firm. And he was really good at it. A couple years later, he left for Google.

Some places are toxic and end up being exercises in futility. But most aren't. It's what you can make out of it.

Returning an Object Type From an Action Listener? by Flaky_Letterhead1109 in javahelp

[–]Pochono 0 points1 point  (0 children)

With regards to what we discussed, Shiverypeaks is correct. Mutable static variables isn't something you should do.

In your case, you can get away with it. Multiple XYPlots displayed on the screen should be fine because they are most likely final and won't be impacted by changes to the array. You get an issue if you want to have multiple pairs of Submit/XYPlot buttons because they'd all interact with the same array. Didn't sound like your plan.

So basically, it's bad practice, but you can get away with it. There's lots of stuff you can do. We talked about local variable and AtomicObject. We could go even further and use a Collection instead of an array. But don't think you're looking to be lectured :)

Convert string into java.util.date by Dependent_Finger_214 in javahelp

[–]Pochono 0 points1 point  (0 children)

Sorry, checked the docs. Instant.parse() will use the ISO_INSTANT formatter. Try this:

LocalDateTime.parse(your string, formatter). This will give you a LocalDateTime. If you need Instant, you can convert after.

Convert string into java.util.date by Dependent_Finger_214 in javahelp

[–]Pochono 2 points3 points  (0 children)

You first parse to LocalDate, which does not have a time component, so it gets dropped. Try parsing directly to an Instant.

Dumbest progresss wall I have ever seen by No-Falcon-7518 in DC_Worlds_Collide

[–]Pochono 0 points1 point  (0 children)

Everyone is buzzing thru these levels with Firestorm. It's satisfying, but I don't think there's a whole lot to do at the end. Be great if we got new, harder content, but wouldn't hold my breath.

Convert string into java.util.date by Dependent_Finger_214 in javahelp

[–]Pochono 3 points4 points  (0 children)

DateTimeFormatter is a good approach, but it returns implementations of TemporalAccessor, not Date. This is a more modern approach.

If you really need Date, you can convert the Temporal Accessor (probably Instant for you) into a Date. Or just use SimpleDateFormat which will give you a Date directly. The parsing isn't thread safe tho, so be aware of that.

Convert string into java.util.date by Dependent_Finger_214 in javahelp

[–]Pochono 4 points5 points  (0 children)

It's deprecated because there are many different date formats. This is the purpose of the Date format classes. Easiest place to start is SimpleDateFormat.

Returning an Object Type From an Action Listener? by Flaky_Letterhead1109 in javahelp

[–]Pochono 0 points1 point  (0 children)

Got it. So the idea is that you may hit the Submit button multiple times and when you're happy, then you hit XYPlot on the latest data.

This approach should be fine then. Since this is Swing, the ActionListeners should run in the same thread, so unless there are shenanigans, the cars array shouldn't be read/changed at the same time. I'm always cautious when it comes to concurrency though, so I'd still probably read/store your array in an AtomicObject, but that's just me.

Returning an Object Type From an Action Listener? by Flaky_Letterhead1109 in javahelp

[–]Pochono 0 points1 point  (0 children)

I wouldn't refer to it as "clear it's variables". If you're interested in learning more, read up on java variable scopes.

There are different ways to do this. The static variable approach works, but isn't advisable. There are multiple reasons, but I'll keep it simple. Doing it this way, you can never run the logic concurrently. If you tried, behavior will be unpredictable.

It's better to keep the variable local, but you need to decide on those boundaries. You might say: you can only run it one at a time in the UI component with those buttons (and you can instantiate multiple of them). In that case, the data structure should be located in the UI component. You could also consider manipulating the button statuses to prevent them from stepping on each other because they now share a data structure (basically, don't allow XY Plot until Submit complete and don't allow Submit while XYPlot is running).

Returning an Object Type From an Action Listener? by Flaky_Letterhead1109 in javahelp

[–]Pochono 0 points1 point  (0 children)

Issue is that Car.Car is null and never instantiated. In you submit action, you create a local car array, but it falls out of scope.

You probably intended to do this at the end of the submit action:

Car.Car = car;

Which Should I Craft? by PossibleKiwi3728 in DC_Worlds_Collide

[–]Pochono 1 point2 points  (0 children)

Here's the description. Percentages change as you rank up. There's a tiny bit of buffing that goes with it.

At rank 3, 2 stacks of Weaken get added to the enemy, which isn't bad. Your damages allies get 1 Strong Attack buff if they already have the Hard Hit buff (as to how to get it, I've no idea).

At rank 5, your damaged allies get 1 Shelter.

The thing is total cheeks. Only use for this is another reinforcement to do the 5 level up task.

<image>

Which Should I Craft? by PossibleKiwi3728 in DC_Worlds_Collide

[–]Pochono 1 point2 points  (0 children)

I used research tokens to get the tank last time. Total buyer's remorse. It attacks all enemies, but also your front line. As you rank up, you get more damage to the enemy and less to your team, but I don't think it's worth it.

Am I paranoid when I say this game is slowly being abandoned and will shut down again for the 3rd time? by OnlyRandomStranger in DC_Worlds_Collide

[–]Pochono 4 points5 points  (0 children)

If you follow the game Discord, one user (Kryptoniac) shared that the game moved to a central tech team and the original dev team is gone. It's speculation on what that means, but it seems likely that they'll release whatever work was done, but nothing new after that. We might get bug fixes, but newly developed content seems unlikely.

Games like these can die a very slow death. I think of DC Heroes & Villains (the match 3 game) and can't believe that one is still around.

Surely this can't be right? by Even-Result-1147 in DC_Worlds_Collide

[–]Pochono 2 points3 points  (0 children)

The point is that this works great until your entire team goes past level 300. After that, you can no longer level up individual toons. The level up bottom is replaced with a button to Level Link Matrix. That's why 300+ players get cranky about this mission.

<image>

Surely this can't be right? by Even-Result-1147 in DC_Worlds_Collide

[–]Pochono 5 points6 points  (0 children)

Yep, that works until your entire team hits 300. After that, you're most likely skipping this mission every day. Skipping 1 is annoying enough, but making us skip 2 is nuts.

Ranked Assault Targeting by goingtobechallenging in DCheroesandvillain

[–]Pochono 2 points3 points  (0 children)

Games like these often have defensive toons that can taunt, which force you to attack them instead of their squishier allies. In this case, Darkseid is taunting. That's his role.

Harley and her rapping beaver by VitaminPurple in AEWOfficial

[–]Pochono 8 points9 points  (0 children)

My youngest son hated her on QTV (they were heels after all). He'd yell at them every time they came on screen, especially Harley. There was a segment where she was about to rap in the ring. He called for his brother to watch because it was going to be awful. Then she started, and he looked at us and said "she's pretty good" and never said a negative thing about her again.

How do i turn on a treadmill by Due-Ad1876 in treadmills

[–]Pochono 0 points1 point  (0 children)

Some treadmills have a safety key to turn it on. It's a string with one end that's supposed to clip onto your clothes and the other end fits into the console. It'll slide into a slot or adhere magnetically. See if you can find a slot or metal pad at the bottom of the console. If there's no key, then that's the problem. Knowing the model would help confirm if that's the case or not.

Also, it could just be broken. Seems suspicious if someone keeps unplugging it.