8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 4y ago · link · parent
When you need to release your application across multiple platforms? Yes. Not much else even begins to compare on that front.
Compared to native development on a single platform? Not even close. HTML/CSS/JS development is painfully slow in comparison.
comment 4y ago · link · parent
In 2007 I invested $12,000 in a small parcel of land I found to rent, rent for the equipment I needed to do the job (along with hiring some customer operators), and lost money doing it! But then 2008 happened, sending commodity prices through the roof. I was able to turn a small profit the following year and used the proceeds to start to buy some equipment, and slowly started to grow from there.
So, some definite luck, an investment, and most importantly having family to answer questions. I think it would have been impossible for me without that wealth of knowledge to draw on.
comment 4y ago · link · parent
For rent? $265-275/acre, depending on the landlord.
> Also, I assume you're not selling to a coop or other large scale buyer?
No, that's where it all goes. There is a co-op grain elevator. All of my IP soybeans go there as they pay a nice little premium. Pretty much everything else, including crusher soys, is sold to the closer-to-home commercial grain elevator.
comment 4y ago · link · parent
You don't really need to be able to compete if you aren't looking for a massive exit, though. My ~150 acres (most of it rented, no less) of corn/soy/wheat provides enough for me to live off of comfortably enough. For about a month's work a year, that's wonderful in my mind.
It seems you're just getting caught up in the capital building frenzy that I talked about earlier. If you want to have the huge payday when you sell then you take on huge debt, grow to massive scale, use all of your income to service the debt and then you're sitting on a fortune at retirement. This is what attracts most people to farming, seemingly you included, which is fair.
If you are content to stay small you can avoid the debt and what the big guy is giving to the bank you can pocket and live well off of. That's where I've settled and it works fine. I won't have the huge payday later, however. It's a tradeoff.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
Crops prices have priced in the increased fertilizer cost already, so it is what it is. We're used to it.
comment 4y ago · link · parent
comment 4y ago · link · parent
You also need a method is deemed legally acceptable. Throwing out all the resumes of women, for example, could land you in some legal hot water. Degrees are one of the few filters that is deemed legally acceptable. It's there to keep the lawyers happy and little else.
comment 4y ago · link · parent
While there is no doubt an entertainment benefit to be gained, that is not likely the best choice for someone without the means to take on nearly a million dollars of opportunity cost.
comment 4y ago · link · parent
Yes, hence why it was able to call the Go functions directly during SSR, the results of which were bundled with the payload delivered to the client. gRPC played no role during initial render.
If the React app needed more information/updates as the user used the app then the function calls would transparently happen over gRPC instead.
Consider:
const MyReactComponent = () => {
const [things, setThings] = useState()
useEffect(() => {
// In-memory call to Go GetThings function during SSR render; gRPC call
// to Go GetThings function when running in the client.
GetThings().then(setThings)
}, [])
return <div>{things}</div>
}
Architecturally, not a whole lot different to how you might build a SSR React app on Node. The backend was just written in Go instead and that backend had a built-in Javascript runtime to execute the frontend code for SSR purposes.comment 4y ago · link · parent
No need to exclude that possibility. I once worked on a Go app that rendered React (in Typescript) server-side. The Javascript could call Go API functions directly when rendering server-side and those calls would turn into gRPC-web calls after it was loaded in the client. It worked really well.
comment 4y ago · link · parent
There was clearly always interest from the project itself. There may have been some random naysayers on the internet who act like they are opposed, but you'll find people acting every way imaginable on the internet. I really doubt anyone actually refrained from working on the project because an internet troll wrote something silly.
comment 4y ago · link · parent
That's the core problem. Anyone who truly understands generics has shown no willingness to work on Go. The only reason it has progressed as far as it has is because a third-party consultant was temporarily hired to develop what was dubbed Featherweight Go to act as a proof of concept.
It turns out that the intersection of people who care about generics in Go and those those who aren't armchair coders unable to comprehend the domain themselves is limited to very few people. As you know well from your armchair.
comment 4y ago · link · parent
It seems to me that that it was less about active pushback and more that people who cared about having generics in Go was limited to an exceedingly small group of people who weren't necessarily experts in the subject matter. In fact, the Go team hired an external expert to lay the groundwork for what became the winning proposal.
comment 4y ago · link · parent
I have a lot more fun writing code in other languages. I enjoy not having that burden on me while writing code. In an earlier life that would have been important to me. Now that I'm old and curmudgeony I've started to value other things.
comment 4y ago · link · parent
And it is always most meaningful to handle it immediately, so what's the point of introducing a application-wide goto jump, amid Dijkstra's warnings that doing so is harmful when you're just going to catch right away anyway?
> The happy path of "make a request" is that there is no network error.
If there is a network error, you're still happy. It is not like you screwed up as a programmer. What is there to be unhappy about? The network error input to your function is very much expected and part of the "happy path" as much as any other input to your application.
> if there is an unexpected network failure, let it crash
Network failures are never unexpected. It would be exceptional to never experience a network failure.
> How do you check which errors you want to handle and which one you want to propagate with just a string describing your error?
Why would your errors be strings? When errors are just plain old values like any other it is true that you could resort to using strings to represent errors, but it would be quite unidiomatic to do so. Kind of like how you can overload exceptions to handle errors, but just because you can does not mean you should.
comment 4y ago · link · parent
Definitely not. Especially because early Ruby implementations brought huge overhead when exceptions were used, you were strongly advised to only use exceptions for actual exceptions. Ruby was one of the first languages that really started pushing the idea that exceptions should be reserved for exceptions, even if was just for technical reasons.
Those overhead problems have been addressed and are no longer a problem, but the sentiment has continued to ring true. I agree that doesn't stop people from trying to overload them, as I said earlier. But idiomatic? Not at all.
comment 4y ago · link · parent
Errors are the "happy path", though. Your network connection was lost for the data you were trying to transmit so you saved it to your hard drive instead means that everything went well! Throwing your hands up in the air and crashing your program because you had to make a decision is not something you would normally want to do. If statements are present in most happy paths for good reason. That the inputs presented you with a choice does not remove you from the happy path.
Now, if you made a programming mistake and tried to access an array index that is out of bounds, then there isn't much else you can do but crash. Exceptions are appropriate for that kind of problem. They are exceptional in that they should never happen. Errors, on the other hand, are expected to happen and you can happily deal with them.
comment 4y ago · link · parent
func read_file(filename string) string {
panic(FileNotFound{filename})
}
func foo() {
a := read_file("a.txt")
b := read_file("b.txt")
// do stuff with a and b
}
func main() {
defer func() {
if err, ok := recover().(FileNotFound); ok {
fmt.Fprintf(os.Stderr, "file not found: %s\n%s\n", err.filename, err.Stacktrace())
}
}
foo()
}
However, exceptions are meant for exceptional circumstances (hence the name), not errors. A file error is not exceptional in the slightest. It is very much expected.While you can overload exceptions to pass errors (or any other value), that does not mean you should. Your use of exceptions for flow control (i.e. goto) is considered harmful.
comment 4y ago · link · parent
However, the question was asking what is different about errors compared to other values. The add function above contains an error, yet I don't know of any language in existence where you would expect a stack trace bundled alongside the result to help you debug it. Why would that need change just because you decided to return a struct instead of an int? And actually, many APIs in the wild do represent errors as integers.