Recent submissions

Comment · 6 years ago
The affiliate thing might be interesting. Insurance is a no-go though. There would be incentive to strike to get more payout on the policy. Or worse, an insurance company would take it and would audit every strike for "legitimacy."
Comment · 6 years ago
This is how I do it as well. I usually find inspiration that makes my code much better. My secret sauce is telling others I am debugging it instead of making a new draft. This keeps someone from insisting that my first draft is "good enough."

In addition, I design my programs such that I can confidently rewrite important sections. This is OOP encapsulation's main purpose. In practice, everyone writes getters and setters until every object is an ugly struct.

Comment · 6 years ago
Go's compile speed is its raison d'être. It straddles the line between convenient scripting languages and heavy compiled languages.

You deal with boilerplate using either interfaces or code generation. It's not as pleasant as first-class generics, but it's not completely awful either.

Comment · 6 years ago
Same here. We are stuck in Watcom F77 right now due to using some old extensions. We are in the middle of eliminating control characters from format statements so we can finally upgrade to new compiler.
Comment · 6 years ago
I actually have had the pleasure of porting a program from a defunct 16-bit language called Actor to C++. It wasn't a huge deal even at around 800 kLOC. All mainstream languages in the future are going to have some combination of structured, functional, and object-oriented programming. Converting is mostly going to be about syntax and libraries.

As someone who has worked with C and C++ for living for over 20 years, I wouldn't think twice about picking either Go or Rust if I were to start again. Go gives you the fast edit/compile/test loop of an interpreted language with the runtime speed of a compiled language. Rust is the language that the C++ Committee would make if they could start over.

That being said, Go will never take over the C, C++, and Rust niche. Going to and from Go-land and C-land is too expensive. Google has no interest in stepping behind libraries that aren't internet servers. Go will live a long life as a great environment to port your Python, Ruby, and other bloated server languages. It just will never be the next language to write a web browser.

Rust is amazing though. I see this as the programming language of the future until the U.S. Government slams down the hammer and forces everyone to use DOD-approved Ada.

Comment · 6 years ago
Commercial success has little to do with your tech stack choices. I don't understand why people are so obsessed with jumping ship for the latest shitty framework just as the old one is getting really good and stable.
Comment · 6 years ago
No, it is very much LSP compliant. The purpose of toString() is to give a string representation of the object. Most overloads of this do exactly that.

An LSP violation of toString() would be something that returns a string that doesn't represent the object. If you were to return the current time as a string for an object that has nothing to do with time, that would be an LSP violation.

Comment · 6 years ago
In my experience, much more damage has been done by people who implement EDA and fancy cloud architecture in general. Something like 95% of applications are simple CRUD with a minuscule amount of custom domain logic. Doing anything beyond a sanely laid out monolith for these is resume padding and potentially project killing. I think people just don't want to admit that their job is validation, presentation, and shuffling data in and out of a database.
Comment · 6 years ago
LSP just says that derived classes should behave similar to their base classes.

    class Base {
        virtual int size() { return size_; }
    ...
    class Derived : public Base {
        virtual int size() { return rand(); }
    ...
Here we see an issue. Derived is overriding Base's size method, which has a straightforward implementation, with something wild. If a Derived is sent to a method expecting Base-like behavior, something bad is going to happen.

Derived should act like a Base with slightly different implementation details. This is all LSP is. It's a fancy phrase for a very simple concept.

Comment · 6 years ago
Prosperity Gospel is very different from traditional Christianity. It is much closer to New Age Spirituality than most Christian denominations.
Comment · 6 years ago
This would be more NSA jurisdiction and they do. The problem is most people's assumption is that if one part of the government has it, then everyone gets it. This is wildly false. Even within the FBI itself, different departments and cases get different tiers of access.

Even when the case agents get access, policy dictates what evidence is allowed to be taken to a public trial. Otherwise you get repeats of the FBI/4chan/8chan debacle. This is especially true for legal "grey areas" like mass surveillance. This means that agents will often get evidence they won't use in order to guide active surveillance using more legal means in order to collect evidence they feel comfortable admitting in public court.

Comment · 6 years ago
>You could end up throwing away years of edge case handling

I work with software that has been continuously worked on since the 60's. It has the dreaded legacy if's like below everywhere.

    if(obtuse variable) then
       change a few other obtuse variables
There have been at least three attempts at major rewrites done of the software. The main goal was always to get rid of those corner case ifs everywhere. Every single attempt failed because we lost our ability to handle massive amounts of our customer's projects. Each of those ifs does something important.

One of my main projects throughout my stay has been to reduce these with small, disciplined improvements. I have made major headway in this fashion. You have to find the leaves of your software and work your way up while rigorously testing your changes. This is the exact opposite of the human gut reaction of a massive top down rewrite. It's impossible to tell how far you are off-course until it's done. It's the waterfall method of refactoring.

Comment · 6 years ago
It comes from two religious movements in the U.S. that became popular starting in the 50's and has been gaining momentum ever since: Prosperity Gospel and New Age Spirituality.

They both focus on you projecting "good vibes" and only allowing others who also project good vibes around you. If you can do this, then (Nature/God/the Universe) will reward you.

Comment · 6 years ago
Always on accident of course. There is no way a hardware manufacturer would intentionally sabotage their products to boost sales.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton