Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
NateDad
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
105 ms
·
841.
▲
by
NateDad
13y ago
This does not seem to be fixing null checks. It seems to be fixing lack of proper error handling. The problem is not that you have to check for null, the problem is that you don't know if null is a valid value, and even if you know it&
842.
▲
by
NateDad
13y ago
Please call it Go, not golang. Golang is the domain name of the language's website, a useful hashtag, and an occasionally useful search term. It is not the name of the language should not be used as such. The language is Go, it should
843.
▲
by
NateDad
13y ago
"it makes a local copy of that external library. And if you have a local copy, you can edit it. And meanwhile, that person you copied the OpenGL code from? They are also changing their version (fixing bugs, adding features, adding bugs). Th
844.
▲
by
NateDad
13y ago
Often times the documentation on a function will state // Read implements io.Reader
845.
▲
by
NateDad
13y ago
That's true. However, there's no such tooling for any other language, either. There's nothing in Java that says "If you have a file and you need to pass it into something that needs a Reader, use FileReader". You have to do some digging to
846.
▲
by
NateDad
13y ago
Honestly, it's only a loss of safety if you randomly throw types you don't understand into functions you don't understand. And actually... most of the time this will do exactly what you want it to do, especially if you're talking about io.W
847.
▲
by
NateDad
13y ago
You still haven't said why you would need to find all implementations of an interface. "Because I'm new to the company" is not a reason. The thing about interfaces is that the function that takes the interface is the thing that defines ho
848.
▲
by
NateDad
13y ago
Outsourcing is the problem here. I've seen some really terrible code written by outsourcing companies, even in static typed languages that are as simple to write as C#. It's not the language, it's the writers.
849.
▲
by
NateDad
13y ago
I read the article this way: I'm brand new to Go. I read neither the os.File documentation, nor the io.Reader documentation, and I'm baffled why I couldn't figure out how to make a File into a Reader.
850.
▲
by
NateDad
13y ago
First off, why do you need to know? The whole point is that interfaces are in no way tied to the things that implement them. Second, you can search for the function definition(s) that define the interface. Search for Write(p []byte) if you
851.
▲
by
NateDad
13y ago
Or if you happen to have some fairly odd code in your executable. All that this really needs is really big array of bytes in one struct of your code. While anything that big should be unusual, you never know what crazy stuff people will wr
852.
▲
by
NateDad
14y ago
As someone personally affected by the lockdown, I find this highly offensive. We were not cowering, though it would not be illogical to do so... we're talking about people proven willing to not only kill and injure hundreds of innocent peop
853.
▲
by
NateDad
14y ago
What's amazing to me is that a bicycle is considered an asset. I can't imagine being so poor as to not be able to own a bicycle... not owning a radio is almost worse, but at least a bicycle doesn't require electricity.... and I don't know
854.
▲
by
NateDad
14y ago
Uh, as a developer of 13 years who has never been in the gaming industry... I question your generalization. I have never seen or heard of anyone saying game programmers are inferior or clueless in my professional career. Granted, I work in
855.
▲
by
NateDad
14y ago
+1 for doing it in Go. If concurrency is your objective, Go makes it easy... it's also very fast both to program in and to run.
856.
▲
by
NateDad
14y ago
The problem with refactoring dynamic languages is that it's very hard for static code checking to let you know when you've missed a spot. For example, what functions take class Foo that should now expect class Bar? What functions called met
857.
▲
by
NateDad
14y ago
Everyone keeps saying "Use Python and write the slow parts in C"..... except that writing GOOD (secure, correct, safe) C is really hard. That's actually the main reason why the Go authors came up with Go. Not to replace Python etc, but to r
858.
▲
by
NateDad
14y ago
This is terrible. It's your job to know how much memory you're using and not to use too much if you can help it. In many environments it's set at a very low value - desktop, mobile, client-side web apps, embedded. Even in an environment whe
859.
▲
by
NateDad
14y ago
That requires that you do something stupid to get a key logger installed on your machine. And yes, in that case you're screwed. However, you're far less likely to have that happen than some random site you're on getting hacked. You are one
860.
▲
by
NateDad
14y ago
Yes,thank you. Exactly what I was thinking. Anything you can think of as an algorithm, someone else can think of too, and then they can test that instead of going through billions of combinations. There's only two good pieces of password ad
861.
▲
by
NateDad
14y ago
So, you're wrong about the entropy in the pass phrase. XKCD goes into the math, and for a sufficiently long phrase, there's plenty of entropy. And yes he takes into consideration there's only so many English words.
862.
▲
by
NateDad
14y ago
Man, code coverage is a horrible metric.
863.
▲
by
NateDad
14y ago
You're using layout to cover up the fact that you're not testing the most important line in that function . Error handling should be the FIRST thing you test.
864.
▲
by
NateDad
14y ago
I think this was actually just another 1/10th developer article. There's developers that are worth paying, and then there are those developers that actually subtract value from your company by creating such a hacky mess that it costs more t
865.
▲
by
NateDad
14y ago
Please don't call it golang. It's Go. Golang is a tag you use so people can search for your article... but it shouldn't be the formal name you use when talking about the language.
866.
▲
by
NateDad
14y ago
My wife worked with a guy who closed a ticket about closing tickets. If you're measured purely on the basis of number of tickets closed, you can game the system. Replaced users mouse, ticket closed. Or, upgraded network software on 300 mach
867.
▲
by
NateDad
14y ago
1. Google isn't going to stop giving them money, as Go solves a ton of Google's problems with C++. 2. There are over 300 non-google contributors already http://golang.org/CONTRIBUTORS
868.
▲
by
NateDad
14y ago
Using panic and recover is strongly discouraged, and in the rare cases where it makes the code significantly simpler, panics should never cross package boundaries (which is to say, you should never have a public API that can panic, unless y
869.
▲
by
NateDad
14y ago
How do you know what failed, then? A try/catch around the entire function simply tells you "something failed". Often times that is not good enough in a real program. You can't handle the error, since you don't know what function call it cam
870.
▲
by
NateDad
14y ago
While I don't think it's really a harsh criticism to say that Go shouldn't be your first language... I'd be interested to know what you think a good first language would be. Certainly not C or C++, if you're discounting Go. I'd also discoun
More ›