jond3k's comments

jond3k | 9 years ago | on: When Roman “Barbarians” Met the Asian Enlightenment

I'm suspicious of any article that's widely slated by a community yet still trending.

I feel there's a market need for a browser plugin that lets you filter out clickbait factories like his employers and all the dirty tricks they use to hijack our attention. There's no way we can keep up with them without computer assistance.

jond3k | 9 years ago | on: LogicJS adds logic programming to JavaScript

Babel has to turn it into valid JS for it to work so you'd still have the 'and' and 'or' functions. In the bottom right corner of Hzoo's example you can see what I mean (http://astexplorer.net/#/ZT6HYai08w)

It should be more obvious what expressions are supported when it's validated by a Javascript parser. This is in contrast to the 'dynamic' approach which has no problem with the following until runtime:

    and(gherkin(or()))

jond3k | 9 years ago | on: LogicJS adds logic programming to JavaScript

To solve the readability issue, why not use Babel to transpile JS expressions into the equivalent syntax?

To generate the first example in the readme:

  import {solve} from 'logic'
  
  function father(x,y) {
      return x =='mcbob' && y == 'bob' ||
          x =='bob' && y == 'bill';
  }
  
  solve(father) // a noop function used as a marker by babel

jond3k | 12 years ago | on: The Anglosphere miracle

Something that is true of a group he is a part of isn't necessarily true of him. However, if he did want to change parties over this he'd have to drop out of mainstream politics entirely.

jond3k | 13 years ago | on: It’d have the fifth largest population in the world (infographic)

Let's draw a distinction between registered users and active users. Browser games have notoriously high inactivity rates. Many - perhaps most - create accounts, play once and never return. This doesn't include the number of users who have multiple accounts, macro miners etc.

jond3k | 14 years ago | on: Garbage collection with Automatic Resource Management in Java 7

There's a problem with box 2. If the IOException is thrown in the stream's constructor (FileNotFoundException) then there will be a NullPointerException if we try to call close!

  InputStream in = null;
  try
  {
      in = new FileInputStream(new File("test.txt"));
      //do stuff with in
  }
  catch(IOException ie)
  {
      //SOPs
  }
  finally
  {
      try
      {
          if(in != null)
          {
              in.close();
          }
      }
      catch(IOException ioe)
      {
          //can't do anything about it
      }
  }
This merely proves your point! :-)

jond3k | 14 years ago | on: Why do most programmers work so hard at pretending that they’re not doing math?

I think the point is that there's something intrinsically verifiable about a mathematical model since you're dealing with quantifiable output.

Other cases I can think of are systems where high-throughput or low latency are major requirements but there aren't many of those. Most of what we do is about getting more users or making more profit - good engineering performance and decisions are not directly related to these.

jond3k | 14 years ago | on: Why do most programmers work so hard at pretending that they’re not doing math?

"We work in an environment where hearsay and taste drive change instead of studies and models. We are stumbling in the dark."

I completely agree. Programming became a lot less fun once I entered industry and realised most decisions are driven by fashion and office politics. It's not so bad when it's you and a couple of friends hacking all night on a project because you likely have closely aligned interests. Being an employee, however, means you're a slave to other people's ideals.

I suppose this is why most of us are interested in startups.

You may also be interested in this post by Zed Shaw: http://zedshaw.com/essays/programmer_stats.html

~~~

Surely the first person to write an algorithm wasn't Babbage or Lovelace, but more likely to have been the middle-eastern mathematician the word was named after? http://en.wikipedia.org/wiki/Mu%E1%B8%A5ammad_ibn_M%C5%ABs%C...

jond3k | 14 years ago | on: Coding Skill and the Decline of Stagnation

>There is a certain danger in being educated, for example a self educated programmer might have a problem and just implement a O(n^2) solution and move on whereas a college educated programmer might spend excessive time trying to work out a way to do it in O(log N)

The CS graduate will have covered big O classifications but if they immediately focus on this form of optimization it's probably because they have spent years reading blogs that tell them this is the nature of tests at places like Google.

If every CS grad automatically thought this way by virtue of their education there would be no reason to test for it in interviews simply because a CS degree is often a minimum requirement for the kind of job where you'll be asked these questions.

It's only a priority if you make it one and those self-taught guys can probably self-teach themselves big O.

jond3k | 14 years ago | on: A reboot of PHP: keep the philosophy, improve the syntax with the jvm

It looks like someone had fun!

Native parsing of markup and SQL looks like a neat idea (reminds me of Facebook's XHP plus LINQ) but I'm concerned about using the JVM. Does this use a .NET style multithreading model instead of using one process per request? If not, I can't see the benefit of using a JVM given its best features (GC and JIT) would be rendered not only useless, but a bit of a drag.

My personal PHP wishlist is:

* Better interfaces for the core libraries. Ideally replacing them all with namespaced and object-oriented ones with none of this needle-hackstack mixup

* A standard autoloader

* Removing the concept of 'PHP errors' and replacing them all with exceptions

jond3k | 14 years ago | on: The websockets api spec doesn't like you

Maybe, or perhaps it's just been done badly before.

ZeroMQ's bindings are an example of it done well. I find the API is almost identical if I switch between Python, PHP and Erlang and I never feel like any of these implementations feel out of place in their language.

I agree with your final point.

page 1