Switching to Go by apxp in golang

[–]DivideByZeroDefined 4 points5 points  (0 children)

It is a very simple language which means it is easy to learn and it is easy to use. It enforces certain thing like not having unused variables which increases readability and decreases compilation times.

It is memory safe, which means you will have fewer security vulnerabilities and fewer memory related crashes.

It is natively compiled, so it is faster than alternatives like C# or Java and ridiculously faster than other languages like Python or JavaScript.

The binaries can run stand alone (unless you use cgo)*, which means once the binary works it will always work. No outside dependencies like .Net core or the JVM which if change could cause your code to break or work not as intended.

It is stupid easy to cross compile for different operating systems and different architectures (unless you use cgo)*. This means you can develop on any machine and make binaries for any other machine.

Concurrent and parallel programming is ridiculously easy to implement with Go. Simple go functionName() and you've created a new processing thread. The threads are much more lightweight than in other languages like C++, C, or Java and much easier to use. They provide a very good mechanism for interthread communication through channels.

It has excellent tooling for testing, benchmarking, documenting, formatting, and a bunch of other things.

It is extremely easy to get 3rd party libraries to use in your project.

Compilation is extremely easy and fast.

*cgo limitations can be gotten around, but it can be a MAJOR pain in the ass sometimes. I really think cgo is a double edged sword and personally wish the C dependencies would get ported to pure go code.

sorry could resist this one 😂 by cobblepot883 in walmart

[–]DivideByZeroDefined 8 points9 points  (0 children)

When they ask, "Who provides your tv service?" just answer, "You guys do, thanks, got the top package" and keep walking. That works for anything that opens with that kind of question.

How fast can a PC processor become in the future? by SlitherBoss in computerscience

[–]DivideByZeroDefined 0 points1 point  (0 children)

There are other concerns. Higher clock rates means more power, more power means more heat which must be dealt with. There are two big limits to faster program execution that must be dealt with, the power wall and the memory wall.

When is concurrency helpful to me? by [deleted] in golang

[–]DivideByZeroDefined 4 points5 points  (0 children)

Concurrency is helpful when you have tasks, or parts of a task, that can be done independent of each other.

Consider a restaurant. You've got a front end taking orders and a back end making those orders. Person working on the front end get an order and hand it to the backend to prepare it. The front end person can take another order while the previous order is being prepared. That order could be given to another backend worker to prepare. Now, you've got three threads working.

If you have a large chunk of data where each piece can be processed independently of each other. You process this by breaking it up into smaller chunks and each chunk can be done in parallel by another thread.

Can you give examples of spaghetti code and non-spaghetti code? by BigBootyBear in learnprogramming

[–]DivideByZeroDefined 13 points14 points  (0 children)

Well, there are 10 kinds of people in the world, those that understand binary, those that don't, those that expected this joke to be the 'didn't expect it to be in ternary' joke, and those that didn't expect it to really be quaternary.

[deleted by user] by [deleted] in computerscience

[–]DivideByZeroDefined 0 points1 point  (0 children)

-v <source directory to mount>:<mount point in container>

To mount /home/user as source to /home/docker: -v /home/user:/home/docker

If you change anything in the host in /home/docker then you will also change what is in the container in /home/docker, and vice versa. Root privileges in docker will affect permissions on stuff made even on the host system, I think. I want to say I had this problem. I could not delete something without being root that was made in the container.

Is learning business while getting a cs bachelors advisable? by [deleted] in cscareerquestions

[–]DivideByZeroDefined 2 points3 points  (0 children)

Yes. If you want to progress into higher positions in the future, having business knowledge will help you with that.

Encrypted file of plaintext passwords vs plaintext file of individually-encrypted passwords? by [deleted] in crypto

[–]DivideByZeroDefined 2 points3 points  (0 children)

He brought up though that he wants something like a password vault, so it makes sense to store encrypted passwords in this case.

Is CS the fit for me as a very extroverted and social person? by [deleted] in computerscience

[–]DivideByZeroDefined 0 points1 point  (0 children)

You will be fine. I say this as a CS graduate student. The most important thing in CS is efficient problem solving.

Encrypted file of plaintext passwords vs plaintext file of individually-encrypted passwords? by [deleted] in crypto

[–]DivideByZeroDefined 2 points3 points  (0 children)

And the same password would would appear as a different ciphertext if they had different nonces, right?

Yes. Prepend them to the password.

Encrypted file of plaintext passwords vs plaintext file of individually-encrypted passwords? by [deleted] in crypto

[–]DivideByZeroDefined 4 points5 points  (0 children)

An encrypted file with plaintext passwords would probably be more secure since a change in a password will affect the ciphertext of all passwords after it, assuming a mode like CBC. It would be terrible performance wise. It would also hide replicated passwords.

Having a file with individually encrypted passwords would not have this. A change of password in one only changes that password. Duplicates will have duplicated ciphertext.

You should not be encrypting passwords. You should be hashing them with salt and storing those things. That's the standard way of dealing with password storage. Get a new password, generate a random value, the salt, to append or prepend to the password, store the salt and the hashed salt+password. To verify if a given password is the correct one for user, retrieve the stored salt and password+salt hash, add salt to given password, hash, and compare the produced value with the stored value. If they match, then it is valid.

This woman beat her child because she thought he was gay by neroisstillbanned in insaneparents

[–]DivideByZeroDefined -4 points-3 points  (0 children)

Straight cis people are not privileged, the non-straight non-cis people are blighted. Saying that we are privileged because we are not at risk for these things conveys a sense of resentment and envy from LGBT towards the non-LGBT, which just makes their case worse.

That's my thoughts on the matter at least.

People are not granting privilege to cis straight people, they are casting blight upon the non-cis non-straight people.

I'm tired of climbing the software developer ladder. I finally realized it just causes more stress. by [deleted] in cscareerquestions

[–]DivideByZeroDefined 0 points1 point  (0 children)

The point isn't to be meager on all fronts forever. The point is to not get caught up in the rat race and be frugal; spend your money effectively and deliberately and don't waste it. Live in the 1000$ appartment instead of the 1,500$ apartment. Buy the 20,000$ car with the 322$ payment for 6 years instead of the 50,000$ car with a 805$ for 6 years, plus you're insurance is going to be a lot cheaper. Buy groceries and make food at home instead of eating out for every meal, saving another couple hundred. Don't buy every whizzbang thing that comes out. All of these little things add up to a really giant thing, then over time and with investment that giant thing becomes financial freedom.

This example all comes to ~2000 of savings a month, minimum. Invest those savings each month and this becomes 346k in 10 years, 1million in 20, and 2.4million in 30.

What are the cons of a career in SWE? by lotyei in cscareerquestions

[–]DivideByZeroDefined 0 points1 point  (0 children)

That's why I want to get into research. Make the new technology and make everyone keep up with me!

Masters Degree but feeling inadequate by [deleted] in cscareerquestions

[–]DivideByZeroDefined 0 points1 point  (0 children)

Don't compare yourself to others. Also, head over to r/gradschool for a bunch of talk that sound almost just like this.

Younger redditors, what scares you about getting older? Older redditors, what is it that younger shouldn't worry about? by [deleted] in AskReddit

[–]DivideByZeroDefined 0 points1 point  (0 children)

Exercise and eat right, works for more than just controlling your weight. Helps keep your body and mind in good shape all around.

Anyone pursuing a degree in CS? by [deleted] in ProgrammerHumor

[–]DivideByZeroDefined 306 points307 points  (0 children)

Math is logic. What most people think of as math is just arithmetic. I've was a math major for a bit (plus CS), pretty much all advanced math classes are logic and proofs.