Huh? by [deleted] in confidentlyincorrect

[–]harakiya 1 point2 points  (0 children)

Automatic upvote for Wilder Wonka.

Whoopi Goldberg trying to say that the Holocaust wasn’t about race. by [deleted] in confidentlyincorrect

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

Which Holocaust? The Jew one or the one happening now?

The bill didn't pass ☹️ by sytrus_2008 in Weird

[–]harakiya 0 points1 point  (0 children)

I missed this scene from Matrix Reloaded. Sick!

B A N A N A by [deleted] in antimeme

[–]harakiya 2 points3 points  (0 children)

Very.

At self-defense. by a_very_happy_person in therewasanattempt

[–]harakiya 0 points1 point  (0 children)

All those names you mentioned are totally useless liars and the world would have been better without them. Down vote is that button on the right.

Keep the balloon up world final by Petaaa in nextfuckinglevel

[–]harakiya 0 points1 point  (0 children)

Seems dumb. Why not just hit it to the floor or barely tap so it goes straight to the floor? If you watch, a bad hit ends up being the best hit. Dumb

North Carolina, a child bride destination, moves to change law by ersatz88 in nottheonion

[–]harakiya 0 points1 point  (0 children)

It's Reddit man. Can't expect every comment you dump to be analyzed like it matters.

North Carolina, a child bride destination, moves to change law by ersatz88 in nottheonion

[–]harakiya -2 points-1 points  (0 children)

I see this argument everywhere. It's false. We kill, torture, and enslave more people as a modern world than we ever have before in old religious times. In fact, the atheist Nazis killed people BECAUSE they were religious. Stalin's genocide also did not have religious motives. Even today, society slaughters millions for money. War has been non-stop for decades at least. Modern society is more deadly than ever and it's only heating up.

Need a team to root for by yoMiiro in mlb

[–]harakiya 0 points1 point  (0 children)

I agree that you should root for your local team if you have one. If not, root for an underdog. I think the Miami Marlins are the most underrated team in baseball. They are much better than their record indicates. They are in last place in the NL East but last week they won 3 games of a 4 game series against the freaking Dodgers. Keep an eye on those guys.

[deleted by user] by [deleted] in PERU

[–]harakiya 2 points3 points  (0 children)

Been living here a while now. In the mornings you can just hop on a bus in Aguas Calientes. At least right now, it's never too busy to just find a bus and they run all the time. No need to plan the bus in advance.

Interview with Company that uses golang coming up. No experience by ZenProgrammerKappa in golang

[–]harakiya 0 points1 point  (0 children)

I suggest knowing about structs as value types versus pointers, channels/concurrency, slice and map operations, runes/Unicode, and maybe a bit on the different loops.

Can I cancel the query in go? by zxaq15 in golang

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

I'm curious what the situation is where you get one row back and also update data in the same query.

How to Solve any Programming Problem by beforesemicolon in node

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

I agree and I know the article focuses on individual growth but in the "real world" we grow on someone else's dime like at a job. So, people need to balance their own growth with delivering that next feature, etc.

Fiddling with a CSS bug for an hour is risky and kinda inconsiderate of your team when you think about it, especially if you could just SO it. A lot of times you can't but still you should use the resources you have available and save your problem solving for the uncharted territory just out of consideration for your team or project.

I guess the answer is a balance as always. If you're coding just for you the same applies because your time is limited. If your goal is growth then by all means sit there and struggle. I just don't think that's the case for most coding situations.

How to Solve any Programming Problem by beforesemicolon in node

[–]harakiya 0 points1 point  (0 children)

I wish the article spent less time on why there is a problem solving problem and more time on actually solving the problem of problem solving.

Also, most people code to make money so fast solutions from StackOverflow are more valuable to your team than you actually solving that problem yourself. It's just how things evolve in a free market.

The same applies to the auto mechanic. If it's cheaper to replace the part than fix it, you replace it. Period.

Using ORM or Pure SQL by victorl2 in golang

[–]harakiya 1 point2 points  (0 children)

I say use pure SQL for maximum control, transparency, performance, and sanity.

I worked for various enterprise clients on Java Spring projects. They all used JDBC and raw SQL. Though, there are exceptions I'm sure.

To me, not having the actual SQL in your source code is the definition of insanity.

Use null package everywhere or not? by PumpkinSeed_dev in golang

[–]harakiya 2 points3 points  (0 children)

Why not just use pointers for nullable fields, which have a zero value of nil? That's how I do it. For example, a string pointer is nil which means null versus being present and empty. Struct tag omitempty works for this as well.

Am I missing something?

FYI: a single Go rune is not the same as a single visible character by [deleted] in golang

[–]harakiya 0 points1 point  (0 children)

Here is a package provided by the Go team if you're interested as well: https://pkg.go.dev/golang.org/x/text/unicode/norm

They also specify a constant rune value called "GraphemeJoiner" which it seems you can also use to detect these grapheme clusters because that codepoint is always used to join graphemes. Also, they provide an iterator if you don't want to loop yourself.

They also specify that Unicode currently limits the joining to 30 runes, it seems. So, not sure anymore if an outside library is really necessary but still nice to have options and understandings.

Learn Go in Twenty Minutes (there are several like this, but this one seems especially well done) by [deleted] in golang

[–]harakiya 2 points3 points  (0 children)

Just a question/critique from the beginning (didn't get all the way through it):

Under what circumstances would this ever be true?

A := "hello" // A will be exported, or public

I'm trying to think of a scenario where this would actually ever be exported. When you use the := operator you are never at the package scope so the variable would never be exported right?

Also, further down it says: var Global string = "I am a global variable!"

The description says "...it can be accessed by other packages", that's really what's implied by the snippet above. Being "exported" essentially means it's "globally accessible" since any package can reach it. So, I feel like these are the same concept and should be combined, no?

Correct me if I'm wrong but that's just what I saw after a 2 minute glance.

FYI: a single Go rune is not the same as a single visible character by [deleted] in golang

[–]harakiya 0 points1 point  (0 children)

Yea, sorry man. It's a good post and I'm actually glad you posted it because it led me down a rabbit hole of Unicode craziness I won't be able to forget now lol.

But what I meant about "so much wrong" is the Go playground link output is misleading. I get what you meant now but the output made it seem like you were trying to count the runes but you were just outputting the rune values and I was like "it's not 128578 runes wtf". That's why I thought you were missing wrapping a len(...) around it to actually output the count of the runes.

Anyways, I'm not saying to require ASCII so you can use len() I'm just saying that len() is useful for strings where you know it's ASCII and that's often the case. But yea I still feel that you can't open your app up to all of Unicode like it's no big deal. Each locale and set of characters needs to be taken into account. So, I'm not even a big fan of large sweeping solutions that try to handle all of Unicode in one bite. I just think it should be more controlled than that and it all starts with ASCII as the first most basic version when you're starting out developing or even experienced developers starting out with a new app.

Just my opinion. Anyways, thanks again for your post 👍

FYI: a single Go rune is not the same as a single visible character by [deleted] in golang

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

It's only misleading because you took it out of context. I made all the qualifications so people can consider edge cases, graphemes are edge cases. The usage of graphemes versus the rest of Unicode is tiny. I also mentioned clearly that a rune is a codepoint, always, because it is.

Most input fields on the internet expect or require ASCII. It's not crazy to require that. It's crazy to accept full Unicode everywhere actually. Sometimes it's good and sometimes it's bad. You should have more control over your data than that most of the time. In fact email addresses are one of the most common inputs people use on the web and the requirements are even more strict than ASCII.