News for hackers. Stuff that matters.

jond3k

Re:When Roman “Barbarians” Met the Asian Enlightenment on Tuesday October 04, 2016 @10:47PM (#12641243)
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.

Re:LogicJS adds logic programming to JavaScript on Tuesday August 16, 2016 @06:07AM (#12296449)
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()))
Re:LogicJS adds logic programming to JavaScript on Monday August 15, 2016 @04:18PM (#12293087)
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
Re:The Anglosphere miracle on Saturday October 12, 2013 @08:46AM (#6538527)
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.
Re:Why Canada Has No Big Tech Companies on Sunday July 21, 2013 @04:41AM (#6078258)
If you're a small-time programmer unless you move to SV, what does it mean to be 'big' in programming?
Re:OECD: Telcos Overcharging By Five Orders Of Magnitude on Monday November 26, 2012 @09:17AM (#4831973)
What's stopping an entrepreneur from building a new network now, in a single town?
Re:OECD: Telcos Overcharging By Five Orders Of Magnitude on Monday November 26, 2012 @09:15AM (#4831968)
Looks like a good article but the url violates the same origin policy and as a result it render images. Readers will get a better looking page if they knock the 's' out of https until the owner can fix it
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.
Re:Twitter sells multi-billion tweet archive on Thursday March 01, 2012 @08:34AM (#3651985)
"privacy betrayed" -> any of this data was ever private. it wasn't.
Re:Show HN: Like Yahoo Pipes, but works on Thursday February 23, 2012 @05:11PM (#3627034)
I like the boxes but it desperately needs immediately visible results.
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! :-)
Re:Search: .lenght - Github on Saturday January 14, 2012 @08:55PM (#3466023)

  #  Language    Illiteracy
  1  C           0.02877583  
  2  Perl        0.01635618  
  3  Ruby        0.01560477  
  4  JavaScript  0.01330989  
  5  Shell       0.01235425  
  6  Python      0.01046104  
  7  PHP         0.00910218  
  8  Java        0.00736395  
(For height, length and hierarchy, averaged out)

And you thought this would end up being a PHP joke...

https://github.com/jond3k/sandbox/tree/master/github-illiter...

Re:Search: .lenght - Github on Saturday January 14, 2012 @08:50PM (#3466018)
I noticed another problem is that the highlighter will select the language name as well as the term which means <?php and (c) Copyright are shown instead of the actual mistake.

I put together a GitHub Illiteracy Index script https://github.com/jond3k/sandbox/tree/master/github-illiter... which you can play around with if you like :D

Well observed, but I think we need to tell apart cases where performance is mandatory and where it is optional. People wouldn't just complain if it was mandatory, it simply wouldn't be a viable product.
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.

"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...

Re:Coding Skill and the Decline of Stagnation on Saturday January 14, 2012 @07:28AM (#3464115)
>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.

+1. wish I'd seen underscore.php sooner!
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

Re:The websockets api spec doesn't like you on Sunday October 09, 2011 @11:26AM (#3090598)
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.

Re:IOS products are a local optimum on Saturday October 08, 2011 @09:31AM (#3087872)
Weather forecasts are a more optimal way of knowing the future than looking at the sky. These incremental improvements might not mean much by themselves, but in aggregate, they've meant the human race has come very far.