News for hackers. Stuff that matters.

geonik

Re:Why pigeons mean peril for satellite broadband on Monday August 30, 2021 @01:39AM (#28353062)
The pigeons surely concluded that RFC-1149 cannot compete with satellite broadband on technical merits alone, so they started sabotaging competitive installations with any means they have!
Re:Show HN: Free Screen Share Party, No Install, No Login on Sunday March 29, 2020 @11:15AM (#22719657)
You may want to check https://whereby.com/, it works on the same principle, but you get to choose your own URL suffix, thus making link sharing easier.
Re:Why I left React for Vue on Wednesday December 26, 2018 @07:27AM (#18761826)
There is! It is called Qooxdoo, exists for years, and works wonders around the impedance mismatch.
Re:What is my public IP? on Wednesday February 03, 2016 @06:26AM (#11025892)
Re:RESTful APIs R.I.P. on Friday August 28, 2015 @07:18AM (#10134779)
When it comes to APIs, every now and then someone say "X is dead, Y is the future".

APIs are not a one-size-fits-all problem, and while general trends and paradigms are a nice thing to have, developers should not be restricted by whatever is the hottest buzzword today.

A nice and clean API will always be pleasant to use, and this has nothing to do with RESTful awesomeness or SOAP verbosity.

Greek startup owner here. Our government is trying to recover from a mistake by commiting a bigger one. Our Varoufakis-illusioned prime minister thought that he could force a better deal from Eurozone members by blackmailing with a worldwide economic Lehman Brothers moment. This obviously didn't work, and the referendum theatre was setup to cover up the failure. That in turn, is a huge gamble, putting the country's prospects for generations to come at risk.
Re:How Enums Spread Disease – And How to Cure It (2012) on Wednesday April 15, 2015 @01:53PM (#9382763)
I second that; Java has solutions for all problems described by this post.

- constructors, private fields, methods, addressing the "separations of concerns" - how about Enum.valueOf(enumClass, text.toUpperCase()) to avoid the "classic shadow array of string literals"?

Here is an example of what can be achieved by Java enums

  enum Type {
    ANIMAL(null),
    MAMMAL(ANIMAL),
    DOG(MAMMAL) {
      public void makeNoise() {
        System.out.println("Woof");
      }
    },
    CAT(MAMMAL) {
      public void makeNoise() {
        System.out.println("Meow");
      }
    };
    private Type parent;
    Type(Type parent) {
      this.parent = parent;
    }
    public boolean isA(Type type) {
      if(this == type) return true;
      if(parent != null) return parent.isA(type);
      return false;
    }
    public void makeNoise() { }
  }
  assert Type.DOG.isA(Type.MAMMAL) == true;
  assert Type.CAT.isA(Type.DOG) == false;
  Type.CAT.makeNoise(); // "Meow"
Re:Show HN: JSON Query: A tool to query JSON data structures on Saturday January 10, 2015 @05:03AM (#8866438)
XPath for JSON? Who would have thought of that! Now add namespaces and you reinvented XML 10 years later
Re:Windows 10 Technical Preview Source Tree on Thursday December 25, 2014 @09:01AM (#8796246)
What a mess! And, frankly, I don't care unless I can read the source code
Re:XSLT is a failure wrapped in pain on Saturday December 06, 2014 @07:07AM (#8709046)
"the latter point is one of the reasons most people like to avoid XML"

And these are exactly those who will never "get" that XML is much more than a data container for tree-like structures. They should stick to JSON or CSV for that matter.

Re:XSLT is a failure wrapped in pain on Saturday December 06, 2014 @05:03AM (#8708850)
Those who rant about XML and XSLT know nothing about what they talk about. 50% of our server's behavior (200,000 Java LOCs) is orchestrated declaratively by a small number of XML files that use around 30 custom namespaces. These are

1. parsed on server startup for setting up persistence, business rules, REST endpoints etc

2. transformed by XSLT to a) produce nice HTML documentation, including DOT class diagrams b) generate Java source code c) validate declaration integrity and cross-referencing

With the right XSDs, IDE support is excellent (auto complete for everything). Take the time to learn it, apply it according to your needs, and reap the benefits- in the long run, maintenance work is down by an order of magnitude.

Re:Ten seconds of math on Wednesday November 26, 2014 @03:19PM (#8664387)
With default settings:

You scored 666 You are better than 100 %