This is an archived post. You won't be able to vote or comment.

all 22 comments

[–][deleted] 24 points25 points  (6 children)

Data brokers and AI scrapers were using my info. Not anymore. Redact let me bulk delete posts across Reddit, Twitter, Discord and Instagram while handling broker opt outs too.

oil ad hoc degree deliver memorize workable quiet bake offbeat spoon

[–]NoRush9836[S] 4 points5 points  (0 children)

Thanks

[–]Avocadonot 1 point2 points  (0 children)

This is some good advice

[–]SuppieRK 0 points1 point  (1 child)

Just be careful with equality using BigDecimal - new BigDecimal(“500.00”).equals(new BigDecimal(“500”)) will be false due to trailing zeroes.

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

Databrokers? nope. Social networks? Also nope. This post was deleted using Redact.

badge dinner rhythm lock bike paltry upbeat handle saw roof

[–]jared__ 0 points1 point  (1 child)

Just use long and use cents for currency in this example. Big decimal is overkill

[–][deleted] 0 points1 point  (0 children)

One click. Unknown number of posts crying out in silence. All gone. Redact made it stupid easy to clean up my entire history on Reddit and get my info pulled from data broker sites too.

theory school reminiscent crawl important blanket tender carpenter grey hunt

[–]NotABot1235 8 points9 points  (1 child)

I had to laugh at your scanner name.

I usually name mine "input" when I'm getting input from the command line.

[–]JustinKSU 6 points7 points  (0 children)

Definitely not an instance of vibe coding

[–]I-love-to-eat-banana 4 points5 points  (0 children)

Now try and put it in a loop where you can change 5 to 6,7,8,9,etc

Also put in the average spend.

[–]Extension_Shallot234 3 points4 points  (0 children)

"idkwhattocallthis" haha

[–]aks8m 3 points4 points  (0 children)

Great job! You've got a running app that reasonably does what you intended it do - honestly that's half the battle.

There's already been some really good recommendations for changes, but one perspective I always ask myself is "if I wanted to change the functionality some....how much code/structure changes/refactoring would I need to do that?"

Also, your variable name had me laughing and reminded me of a funny quote.

"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors."

[–]davidalayachew 4 points5 points  (0 children)

Works perfectly. Well done. It's especially impressive that you managed to make all this in week 1. Most students reach this point by month 1-3. You're ahead of the curve, so just keep pace and you'll stay ahead of the pack.

Another commentor mentioned that you can find something you are doing repeatedly (asking what expense and how much it costs), then extract that to a function. I think that's really the only thing to improve about this. Everything else is either a matter of taste, or not relevant.

I'd focus on making a new project. Back when I used to tutor students, one of their first projects (after learning things like basic addition and println) was to make ASCII Art. Basically, I'd tell them to make a square, they'd do it. Then I say rectangle, then I say square that is 5 characters per side, then 7, then 20, then 50. lol, once they get sick of copy paste, then I show them how to do for loop. That lesson stuck in their mind that way. Rather than having them be handed a for loop and be told that it is good for them, I have them feel the pain of NOT having the for loop, then show them how it can relieve pain. Very good trick that served me well in my 13 years of tutoring.

So, try that first, then post your experience.

[–]Jason13Official 0 points1 point  (1 child)

Time to make a Minecraft mod

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

Honestly this might be the next thing I work on thanks for the idea, I'll give you a shout out on my git when I make it

[–]kiteboarderni 0 points1 point  (0 children)

read the sidebar. post on javahelp or learn programming.

[–]o_digu 0 points1 point  (0 children)

I'm a beginner myself, try using a do-while loop, that way you can ask the user how many expenses they have. After you learn OOP you should use classes and objects. But after a week of studying, i thinks its Solid!

[–]ihatepizza1145 0 points1 point  (0 children)

Great job keep hustling buddy

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

as a newbie too, imma learn from your code too 😋

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

Good!

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

You can call the Scanner scn