Recent submissions

Comment · 11 years ago
Don't know if it is still true. DNS lookup didn't work correctly when ipv6 was enabled.
Comment · 11 years ago
Code for older Java versions still compiles in Java 8. Code written for python 2.x will not run on python 3.x.
Comment · 11 years ago
Maybe you just don't like traveling. There are lots of stories about traveling digital nomads on HN. That type of life never sounded interesting to me. Maybe you just don't like it either.
Comment · 11 years ago
I've thought about starting my own company, but I don't want to start a startup. I want to start a company without investors that actually makes money from the beginning.

Although it is something I think about from time to time, I am sticking to the job I have for a while. I learn a lot on the job and it's a nice place to work.

Comment · 11 years ago
> Also, your first class isn't fully immutable—getTags should be implemented as follows:

True. It would be nice if Java had some immutable collection classes that don't have mutable methods. A method that gets a List<String> made with Collections.unmodifiableList(tags), doesn't know that it is actually immutable.

Comment · 11 years ago
> If you ever want to change the implementation of Article, you'd break anyone that was using that part of your API. If you use getters, you can change your implementation without breaking the consumers of your API.

Then it wouldn't be immutable, if I can change the implementation I can also create a mutable version.

Edit example

  public class Article {
      private final String title;
      private final String author;
      private final List<String> tags;

      private Article(String title, String author, List<String> tags) {
          this.title = title;
          this.author = author;
          this.tags = tags;
      }

      public String getTitle() {
          return title;
      }

      public String getAuthor() {
          return author;
      }

      public List<String> getTags() {
          return tags;
      }
  }

  public class MutableArticle extends Article {
      private String title;
      private String author;
      private List<String> tags;

      public MutableArticle() {
          super(null, null, null);
      }

      public String getTitle() {
          return title;
      }

      public void setTitle(String title) {
          this.title = title;
      }

      public String getAuthor() {
          return author;
      }

      public void setAuthor(String author) {
          this.author = author;
      }

      public List<String> getTags() {
          return tags;
      }

      public void setTags(List<String> tags) {
          this.tags = tags;
      }

  }
Comment · 11 years ago
why not use:

  public final class Article{
    public final String title;
    public final String author;
    public final List<String> tags;
    public Article(String title, String author, List<String> tags) {
      this.title = title;
      this.author = author;
      this.tags = tags;
    }
  }
Getters don't seem very useful on an immutable object.
Comment · 12 years ago
Punishment also works on cats. You just have to be very consistent when applying it (this is exactly the same for dogs). If you punish your cat(or dog) you have to do it immediately. If the cat is done scratching its nails, and you squirt water, you are too late.

[Edit] Changed negative reinforcement to punishment, rbehrends was correct when he pointed out that negative reinforcement is something different.

Comment · 12 years ago
You should also learn a server side programming language with good performance(Java, C#, Go). I think Java is the best because it is mature, multi platform and you can also use it for Android programming.
Comment · 12 years ago
Most open source/free software(free as in liberty) is free as in beer. It gets payed for by donations and/or big sponsors. It has no hidden costs. Not everything is available as open source/free software, but it is enough have a usable computer and even some games.
Comment · 13 years ago
Because it doesn't exist yet.
Comment · 13 years ago
That such a thing is possible. If I try to get below my limit in the Netherlands I am simply not able to. The only services who can go below my limit are my rent and gas/water/electricity bills. And then I just pay a high interest rate. Which doesn't really matter if you deposit money the next day.
Comment · 13 years ago
Nineteen per cent of teens have posted updates, photos, or other content that they later regret sharing, and seventy-four per cent have deleted people from their network.

I don't really know what these numbers are supposed to show. I've shared content that I've later regretted sharing, but it wasn't a lot of regret. If someone had asked me that question in a survey I would have probably answered yes, but it wouldn't really mean anything.

I've also deleted people from my network, but that was because I didn't really care about them. I can't really find any important information in these numbers

Comment · 13 years ago
In the Netherlands we have enough unemployment money that one isn't forced to take some ridiculous "just be employed" job. But the longer you are unemployed, the harder it will be to find a new job. A hole in your resume doesn't look god

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton