American Idol Cruelty To Contestants

My mother was watching American Idol on Wednesday, and I noticed that it was particularly cruel to the eliminated contestants.

I already commented that American Idol uses Auto-Tune. I’m able to hear the difference now. I noticed it when I thought that the rejected contestants sounded better than the accepted ones.

Most current pop songs on the radio are auto-tuned, so audiences are conditioned to believe that an auto-tuned voice is good and a regular voice is bad. So, when American Idol’s producers favor a contestant, they auto-tune them, and when they disfavor a contestant they don’t auto-tune them. It’s reinforced when the judges sharply criticize the non-auto-tuned performance.

Without auto-tune, the people who are the best singers are overweight, like Pavarotti. With Auto-Tune, singing ability is irrelevant and stars can be picked solely based on appearance. Also, since the star has no real talent other than the marketing hype, they can be discarded and replaced in every few years when they realize they’re being exploited.

There are several places where American Idol is cruel to contestants. The audition phase is cruel to some of the non-picked contestants that the judges ridicule. Why would someone who’s such a bad singer audition for American Idol? The answer is that many of them are decent signers, but they look bad when they’re not auto-tuned and the judges ridicule them.

On Wednesday’s show they did something particularly cruel. They had 20 contestants waiting, only 15 of which would get a chance to sing. The other 5 were already eliminated, but the judges made them sit there and wait.

That was cruel. The audience gets to see the people excited when they’re picked to sing. However, it’s really cruel to the people who were stuck sitting there waiting all night, when the judges had already decided they were eliminated.

Whatsapp And Mark Zuckerberg Steal $19B From Facebook Shareholders

Facebook bought Whatsapp for $19B in cash and stock ($16B buyout and $3B in incentives for the founders to stay with Facebook post-merger). Seriously, that is not a joke. I thought the headline was a joke when I saw it. It’s for real.

Allegedly, it’s a valuation of $40 per user, similar to other deals.

Has anyone here ever heard of Whatsapp before the deal was announced?

Allegedly, most of Whatsapp’s users are in other countries, especially India. Allegedly, that’s the reason Whatsapp sold for so much money, even though most people in the USA never heard about it.

The deal is obviously stupid. This is going to end up like almost all mergers, where they mismanage the acquisition and in a few years all the users leave for a competing product. (One notable exception is YouTube, which is subsidized by Google’s other revenue. One reason a serious YouTube competitor hasn’t emerged is the huge cost of storing and streaming videos.)

Whatsapp has usefulness for at most a couple more years, even if it would be managed well. In a couple years all phones will have a built-in app that does messaging as well or better.

Also, the valuation of $40 per user doesn’t make sense when most of the users are outside the USA, especially in 2nd and 3rd world countries. Facebook makes money from advertising, and advertising to US users is much more valuable to 3rd world users.

Mark Zuckerberg and his backers have special super-voting shares in Facebook, which gives them control of the company even though it’s public. That prevents an “activist investor” from buying up Facebook shares and trying to prevent them from wasting money. Besides, Facebook makes most of its profit off hype and not a legitimate revenue stream, making it unattractive for a typical leveraged buyout. With special super-voting shares, it’s easy for insiders to squander shareholder money on frivolous buyouts.

Given that most of the users are in India, there’s an obvious conspiracy theory. Pay a bunch of people in India $1-$5 each to install the app, then flip it to Facebook for billions. Easy money! (There is one indirect legitimate benefit. Some cell phone plans charge less for data than for text messages, making it a legitimate savings if you use an app instead of text messages. However, most US smartphone plans include unlimited text messaging now. The cost to the cell phone company per text message is negligible. Any data plan benefit to using an app instead of text message is temporary at best, as data plans and text messaging plans improve.)

The founders and backers of Whatsapp swear they didn’t pay for user acquisition. If you believe that, they’ve got an overpriced startup to sell you.

There’s another conspiracy. Allegedly, the same group of insiders control Facebook and Whatsapp. The buyout enables a $19B wealth transfer from Facebook shareholders to Whatsapp’s shareholders and founders. It’s the usual trading favors game. Whatsapp’s backers get a lot of free money, in exchange for unspecified favors later. Facebook is nearing the end of its pump-and-dump lifespan, so milk the shareholders while you can.

The $19B isn’t free money. The cost is dilution for the current Facebook shareholders. The share price of Facebook will tank as insiders dump their overpriced shares on unsuspecting suckers.

Even when the Whatsapp buyout inevitably flops, there will be vague excuses and no accountability.

There’s another theory I heard. Whatsapp owns some patents, presumably the usual type of junk software patent that should never been issued in the first place. Allegedly, Facebook is buying Whatsapp for these patents, either defensively or so they can sue others in the future. Most software patents are things that would be obvious to any software expert in the area, but what counts is the ability to manipulate the legal system. Patents are legal extortion. Facebook might be buying the right to engage in legal extortion in the future, or prevent from being the victim of legal extortion.

This is such an obviously stupid deal that I thought the headline was a joke. It is possible that people in other countries were paid to install and use the app, inflating the numbers. It certainly would cost much less than $19B to buy a bunch of users. The deal is a huge wealth transfer from Facebook shareholders to Whatsapp shareholders. If you were dumb enough to invest in Facebook, you deserve to get robbed.

Reader Mail – 02/02/2014 To 02/08/2014

hgaverin commented on node.js Is VB6 - Does node.js Suck?.
He tells his mentality by bragging about using "[whatever].net". I remind you that .net languages are JIT compile based. Just In Time, compile based means that the raw code is ALWAYS available in UNCOMPILED format for ANYONE to edit or steal. He mentions C++ and VB6, two old languages that are fully able to compile into stand alone executables; and two old languages that are very (read “VERY”) easily multi-threading. C++ is radically powerful. VB6 was designed for Rapid Application Development which can expedite a business’ adapability efforts to changing market environments. Both are fully able to be compiled into stand alone executables, with NO raw code available to ANYONE except the development team. He should have stopped there. But, no, he went on to brag that he was now into coding in ".net" . Then he cursed the users of other languages that he (openly and clearly) pre-stated to not understand sufficiently for a valid boolean response. For him to say that he does not follow the latest trend, and then to brag about using any language that is .net is a reversal of logic. He also went on a rant about mult-threading: If you know how, it can be fairly easy in many languages. He seems to find the tendency of node.js to be single threaded and thus a challenge maybe. Ask someone else for help and adjust it to multi-threading. Industry does not run on crying and whimpering, but rather on self-drive to find solutions, implementing those solutions, and moving on.

I mangaged to read quite a lot of the responses, eventually skipping over the original author's because they approach null, and I thank you others for some insight into other languages. I like C++. I like javascript (and many of its spun off variations).

It is often the programmer (or programmer wannabe) that creates much of the problems in many (probably not all) programming activities. If you have a problem with a language, maybe another language will fit you better. Do not hate someone else that is less or more than you in skill. Do not despise some else that has not acquired your hours of (maybe) experience.

In the past I have cried because of difficulties. Therefore I cannot fault the author for crying about node.js . I can say that he should now try something else. Get a handkerchief, blow your nose, write your own library base to help yourself in your programming endeavors, and move on.


snuprs commented on Design Patterns Suck!.
Another hilarious thing about design patterns is that they encourage developers to repeat themselves.

Whenever you have a recurring "pattern" in your code, you're supposed to factor that out into a method or subroutine or whatever.

But in the case of "design" patterns, they encourage you to do the same thing over and over. It's cut and paste for the ADD generation.

It's fricking hilarious.


I'd like to see someone take the algorithm from this post and do a Java version. I expect it to have performance close to the Javascript version.
fosamax commented on Will GCW Zero Deliver Their Kickstarter Handhelds?.
Lately, the GCW Zero KS turned out to be a SCAM, at least for european backers, since no update was made for more than one month and there are still a lot of Zero to be sent.

So the answer to your question is GCW will not deliver their kickstarter handheld. Period.

Or prove me wrong.

Really? I thought they got their act together and were finally shipping them? Do you have a link/source?

I'm really interested in things like iControlpad, Pandora, GCW Zero. I'm never going to fund any of them through pre-orders or Kickstarter. There's too much risk. I'm only ordering from stock, if I ever do.

fosamax commented on Will GCW Zero Deliver Their Kickstarter Handhelds?.

Just take a look at latest KS comments.

I'm still hoping to be proven wrong but lately things seems to turn out pretty bad.

No updates. No replies to email from the available contacts. No way to get faulty devices fixed. The last sign of life from Justin Barwick is the GCW Zero facebook profile.

Maybe shipments are still on the way but why on earth that lack of communication ?

I totally agree with you that ordering from stock is the way to go. I was even able to get a refurbished pandora since the success of GCW Zero KS campaign.

I paid less for it than for the Zero I'm still waiting for.

I'm sticking with my Android phone as my sole handheld, for now. I'd like to see a viable competitor to Android/iPhone, especially one with a nice physical keyboard. It's going to be awhile still before that happens.

My Samsung Galaxy S4 has no physical keyboard. The physical keyboard was a nice feature that I miss from my Droid 3. The touchscreen typing isn't the same. I might have bought an iControlPad2 from stock, if that didn't turn out to also be a scam.

=====

It does seem shady that stores like iThic have the ability to "order from stock" but the KS backers didn't get their units yet. The advantage of cheating preoders is that units sold on iThic generate $160 new revenue, but fulfilling preorders is just a waste of money. That's very shady. I don't see how any store can be selling GCW Zeros before all the Kickstarter units shipped.

PureWicked.AU commented on Will GCW Zero Deliver Their Kickstarter Handhelds?.

where do I start, I too ordered an SE, a KS and 100 units before KS started to resell here in Australia for here and the NZ market, not all has gone according to plan for me as many of you may be very well aware, after much jumping up and down I finally got half of my 100 units to resell, though I too would love to finally see my KS+SE units with T'shirts etc.. then I could wear them and people could ask me about the GCW Zero, I am still waiting on 48 units and 2 bonus pledge package things, I have lost many customers due to the time frame and of course the fact that later orders than me (ThinkGeek in particular) sold units to my customers though I was meant to have exclusive rights to the Australian, NZ market... so yes I'm pretty pissed off, if any Aussie's are after any please let me know..

Yes, there are two ways you lose from the delay, if you were planning to resell GCW Zeros as a business.

Loss #1 - Customers can buy their GCW Zero somewhere else. The GCW Zero team is selling units before shipping to you, undercutting your sales and stealing potential customers.

Loss #2 - Moore's Law - If the GCW Zero hardware was cool and current when it was designed, by now it's almost obsolete. A 2 year delay means the hardware is half as good compared to newer stuff. The longer the delay, the more attractive it is to stick with your Android phone or one of the newer Android handhelds with current hardware. For example, the current Open Pandora specs are very lame compared to what you can get from an Android device.

A fool and his money are soon parted. You got played.

My takeaway is "Don't back hardware projects on Kickstarter or via pre-orders. Wait until you can order from stock." There is some cool stuff that potentially could be funded, but it seems that scammers are dominating the preorder market. This is 3 scams I know about now, Pandora (not Kickstarter, but direct preorders got cheated), iControlPad2, and GCW Zero.

=====

This looks promising, a GPD G5A.

=====

Another amusing link for GCW Zero. They're trying to raise money on fundable now.


MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.
Last entry for Python. After doing some cursory profiling (using built-in cProfile) I made things more pythonic and made some minor performance tweaks (like using xrange instead of range, which is advised in Python 2.7 but not needed in 3.0) I reduced runtime from 60 to 40 sec.

I remain shocked at the Javascript performance.

What's a link to the updated version?

What I really want is a Java version, especially after all the hate on this post. I'm probably not doing it myself, because I don't want the Java SDK and runtime polluting my PC. I expect it to be comparable to the Javascript version. Many people swear that the Java version would run almost as fast as the C/C++ version, but I doubt it.

MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.

The profiled result is here.

I'll take a crack at the Java implementation. It shouldn't be too different from the C++ code, and I have the Java environment for Android tinkering. No promises on when it'll be done, but I too would like to see the comparison.

Since everything is compute + branch bound, I expect Java to suck. I guess the question is how much.


JJ commented on Another Argument Against noSQL.
'' People “prefer” MongoDB because they’re too stupid to set up a relational database and configure it correctly. '

I use SQL, I also use MongoDB.

Momma says I'm not not stupid like the post said I am.

CRUD is CRUD.

Works for both far as I see it.

Then again, I'm not exactly splitting the atom at work either.

Momma says 'shut up'.

A brilliant argument. You totally convinced me that I'm wrong.

I see this comment thread is going to go like the node.js and Ruby on Rails posts.

It certainly is possible to use MongoDB and noSQL correctly. If you're using noSQL when you don't have many customers or much data, you're almost definitely doing it wrong.

Another Argument Against noSQL

I had an amusing phone interview. I asked what database they were using, and he said MongoDB and mySQL. I asked why MongoDB is better than mySQL. The clueless interviewer replied (paraphrasing) “Setting up a relational database schema is too hard! It’s easier to use a key-value store where you can just stick in arbitrary JSON objects.”

That’s amusing, and what I already suspected. People “prefer” MongoDB because they’re too stupid to set up a relational database and configure it correctly. NoSQL is most attractive to clueless twits. If your data has any kind of nontrivial complexity, such as needing joins, a relational database is better.

(Also, if you want a key-value store, you can have textblobs of JSON in a real database. However, it’s been a mess every time I saw it.)

The interviewer was also complaining about one of his “idiot coworkers” who preferred to do everything in C. He also gave me a technical test. I’m undecided whether I should do it, refuse, or never answer. I do want to meet the guy who likes to do everything in C. After having seen several different “modern”/inefficient languages, I’m thinking of just sticking with C/C++, and writing good libraries for whatever common tasks I have.

Businesses like Google, Facebook, and Twitter need their own custom database, which is some type of noSQL, due to their large volume of data. Your stupid startup isn’t Google. Stick with a real database, and when you get lots of users, then work on improvements (either optimizing your database or switching to noSQL for bottlenecks). People pick noSQL because they want to be “cool like the big boys”, without thinking if it’s appropriate.


Speaking of interviews, I had another amusing conversation.

Twit: What are your rates?
FSK: $X/hr
Twit: What are you getting paid now?
(I know it probably was a mistake to answer.)
FSK: $Y at one job, $Y+epsilon at my other job.
Twit: Oh, so then, if I offer you $Y+epsilon/2, then you’ll be happy!
FSK: Why would I switch jobs for an epsilon/2 pay increase? Do you think I’m an idiot?
[Also, given that I know he's going to be difficult to work with, there's no reason for me to compromise on rates. For $X, I'd be more willing to put up with his nonsense. Actually, $X is probably too low, given that I know he's going to be very annoying.]

Reader Mail – 01/26/2014 To 02/01/2014

Alexandre commented on Only Idiots Use Java For High Frequency Trading.
The only idiots I know are those who say things that doesn't know about. I have a Java implementation algo engine that has the same latency than a C++ implementation. It's much easier to built. It's using Java Real Time, there is no GC pauses for your information. People who says things like "C++ guys are smarter..." are the real idiots. Let them be idiots...

Alexandre commented on Only Idiots Use Java For High Frequency Trading.

Neither Java nor C++. The big players are using FPGA for developing HFT; other parts of system could be done with Java or C++, it depends. A lot of people doesn't know about Java Real Time. It could be used to build very low latency systems. The latency could be as low as with C++.

Anonymous commented on Don't Sign An NDA Before A Programming Job Interview.
Funny, a "major" real estate company asked me to sign an NDA for the interview. I declined. There was also a code assignment after an initial phone call (but before the NDA), not overly difficult and thus not a big deal.

Out of principle I don't want to be under an NDA, i.e. in a position where I cannot speak or act freely. Also the NDA covered confidential information that maybe wasn't even divulged during the interview. So basically, if I signed the NDA and ever used or talked about something that they considered their confidential information then they could pursue me in court. Doesn't that basically turn into a non-compete then? Adding further insult, the main HQ of the company is located in another state so if they were to pursue me in court, I'd have to appear in that (distant) state.

Don't sign NDA's for interviews.


MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.
I wrote a Python implementation at home. Here on a Core 2 Quad 2.4GHz I get a cpp time of about 470 ms per run, and in Python about 60s per run, or over 120x slower. I don't have profiling tools for Python, and haven't done any testing for correctness.

My python code is here. I kept as much of the original style as I could. I think your shuffle algorithm isn't robust in its randomness, but I kept the same algorithm (shouldn't affect timing anyway).

This should give you another data point at least.

Really? 60 seconds for one hand on Python? That's pretty awful. I'm glad I didn't waste time learning Python, especially with the 2.0 vs 3.0 fiasco.

Testing for correctness is easy. Compare the output to the CPP version! You can set the hand manually instead of letting it deal for you.

Actually, my shuffling algorithm is the correct one. Assuming the rng is fair (it isn't though), it will produce every possible hand with equal probability.

I did not do

for (i is 1 to n)

Swap i with random position between 1 and n

I did

for (i is 1 to n)

Swap i with random position between i and n

Mine is correct.

MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.

Re: shuffle algorithm--yes, I read your code wrong, my mistake. Using the % operator on a rand() result can add bias as well.

Re: Python, my version I tested on is ActivePython 2.7.1.3. It should work in 3+ (though I could have used the // operator in 3+). Since I'm unclear on what typically exists in server environments, I left it at 2.7.

You may want to run my code on your platform to get more useful timing numbers.

That is correct, %n on rand is slightly wrong. If I wanted to be perfect, I should exclude the result when rand returns between MAXINT and floor(MAXINT/n)*n. It is a negligible error.

There are other issues with using rand(), such as the fact that it will repeat eventually. There are 52! possible ways to shuffle a deck, but rand() repeats before 52! hands are dealt. It is good enough if your goal is to deal sample practice hands.

60 seconds was convincing enough to me. 470ms per hand for the C++ version is close to the result on my PC, about 10% faster. I thought Python would do a lot better.

What I am convinced is that nothing beats C/C++ (other than raw assembly). I've heard people swear up and down that other languages are faster, but I haven't seen it in practice.

The other interesting test would be Java or .NET. I expect those would be worse than C/C++ also, but I'm not going to put the time in to try it.

MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.

If the process were I/O bound or had high overhead in malloc/free then I'd think .Net might have a shot. I didn't fully convert everything to "Pythonic" style -- getting rid of all globals, for instance, which might optimize better -- but I don't see much more gain.

It really seems to be a compute-bounded case, which is where C++ shines. Even techniques like JIT wouldn't be expected to help because you're processing random values, so the predictive branching can't get better each time you run through a loop.

I'd really be shocked to see anything beat well-written C++ in performance. The advantage of the other languages is primarily development time. I can crank out a Python script to convert data, etc. much faster than C++.

I believe that's why Rails works for many people--if your business model fits Rails precisely. I genuinely like the Ruby language, but community support seems to favor Python, which is why I adopted it as my primary scripting language (after Perl in the late 90s and Ruby in the mid-2000s).

As far as using rand() goes, yes the cycle is limited, but it's reasonable to test as proof of concept. If I were to write my own rand() function again I'd use a standard AES256 approach (crypto hashes are excellent pseudo-random # generators) rather than the old Mersenne twister implementation I used in a simulated annealing project from a few years back.

I find it pretty amazing that chrome js seems to be the best approach after C++. Kinda stunning.

If you want to write your own RNG, a better way is to take the XOR of your custom RNG with a standard RNG. If you XOR two independent RNGs, the result should be no less random than either of them. I thought about taking the XOR of several simple linear congruential random number generators with different periods, leading to a RNG with a VERY LONG period. I was looking for 256 bit and 1024 bit random number generators, but couldn't find anything decent.

Another advantage of writing your own RNG is in certain types of games, if you want to remember the state of the RNG.

My specialty is software that does calculations, which is why I still like C/C++ better than other languages. After doing lots of Javascript and PHP, I'm starting to appreciate strongly typed languages now that I did a little C/C++ again. The compiler errors in C/C++ are so much better than those in Firebug and PHP. For example, C/C++ will give an 'unused local variable' warning, which doesn't happen in Javascript and PHP.

The main reason is that, in C/C++, each arithmetic operation (usually) translates to 1 assembly instruction. For those other weakly typed languages, the interpreter does a lot of extra operations verifying the type of the object. Some older languages like FORTRAN and COBOL might outperform the 'modern' languages, because they were also designed closer to assembly.

I also don't buy that 'modern' languages lead to faster productivity. At one of my current jobs, they're using Javascript and angular.js. It takes them a couple weeks to implement one UI screen (and there's 3 people!), whereas I know it'd take me 3 days per screen using my choice of tools. Even worse, those twits can't implement anything without breaking something else. I guess Test Driven Development (TDD) is necessary if you're incompetent. The site is slow to load and crashes all the time. It's another doomed startup, mediocre execution of a mediocre idea.

Rails is useful if you're cranking out a toy demo of a stupid startup website idea. If you're writing something complicated, which is my specialty, Rails is more of a handicap than a help. A lot of these 'modern' fancy frameworks are useless if you try to implement something that isn't covered by the framework. At the same job, they're using D3. It's taking them longer for them to figure out how to make D3 behave the way they want and figuring out the correct D3 inputs, than it would take for them to just open a canvas object and draw on it directly. Seriously, it isn't that hard to open a canvas object, draw some axes, text, and your chart. Using a 3rd party library is another layer of indirection that makes the website slower.

It is surprising that Javascript/V8 crushed PHP and Python.


commented on Reader Mail - 12/29/2013 To 01/04/2014.
Hello FSK, what is happening with you? It's been a while since you last posted.

Yeah, I know. They took away the local train on the subway, so now I don't get a seat. It took away my blogging time.

I should get back to it, been too lazy.

Reader Mail – 01/19/2014 To 01/25/2014

Don Hoffman commented on About FSK.
I own a restaurant in Pennsylvania. I used to have live bands, karaoke, and djs. I was paying Ascap and BMI up til the end of 2012. I called ascap and bmi that i would be doing anymore live or recorded music. They had me fill out forms to that i have cancelled my account. Now come 2014, bmi calls and says i need to fill out another form which i did via email and fax. Then i had to do the same with ascap. Ascap comes back and says they can not cancel my account because i have tv's that are unmuted. They want bill me 1.28 per occupancy for music jingles from commercials or if a sporting event on tv is playing music. I told them i pay the cable companies for there service and direct tv for the nfl ticket. They said they own the copy rights to the music and i have public place. I am now taking the matter to my state representative and the better business bureau. Any suggestions on anything else i can do.

There isn't much you can do. Most of the TVs in restaurants are muted for precisely this reason. Sounds weird, but that's the way it is. The commercials pay for a license to use the music, but due to the bizarre way copyright law works, that doesn't also include the right for you to play it in your business.

Unfortunately, the music licensing cartels own Congress and the judges. Don't expect success. I know it's a drain on your business. Nonsense like this is one of the reasons the economy is so bad. Also, once you do sign a contract with the licensing cartels, they got you now. They'll make all sorts of excuses to prevent you from ending it, and the contract includes high interest rates and fees if you pay late.

One loophole that may work in your favor is that, if you have fewer than a certain number of speakers, you may not have to pay the fee.


Architect commented on Software Architects Suck - Never Trust A Software Architect.
Wow. This was pretty long winded.let's face it there are a lot of people in software that don't know what they're doing and can cover up their bullshit with documentation and politics.

I'm a software architect. But you know what, I earned that position and title through 15 years of hard work designing and implementing software solutions. I still write code. I still deploy software and automate processes. What I do that our developers don't is interface with clients, join sales calls as technical support, and lead our software evolution in a sustainable manner.

So get off your high horse as a developer. We know you've been in the trenches. Software is hard work, get over it. Realize that you own your own career and go work with people who will appreciate you and your skills.

Reader Mail – 12/29/2013 To 01/04/2014

Ken Carlson commented on About FSK.
I am a lawyer in the LA area, helping local restaurant owners in our little mountain village of Idyllwild, California, deal with ASCAP and BMI.

In 1966, the Justice Department criminally prosecuted BMI and ASCAP for Antitrust violations, and the plea bargain resolving those actions because euphemistically known as the "Consent Decree." In each of those cases, the organization is required to offer less than the "blanket" license to anyone who asks for it, like a restaurant. The goon squads that contact these small businesses defraud them by claiming that they have to pay the same as everyone else, but the Consent Decree says otherwise. If the parties cannot agree on a reasonable price, then the NY Dist. Court will take the case.

The Consent Decrees do not identify what kind of subset a given licensee might request, so I chose selected genres of music played in my clients' restaurants: jazz, folk, soft rock, etc. from given eras. ASCAP and BMI refused to give a license by genre, claiming that they have no way of doing that. Thus, for the past 3 years, my clients have paid nothing, waiting for the price BMI and ASCAP would offer. My clients continue to have music, and will only have to pay the reduced rate retroactively, if and when the issue is ever resolved. Rather than be shut down, we put BMI and ASCAP on the defense.

Defense? Absolutely. The Consent Decree requires them to treat all similarly situated licensees equally. If one of my clients pays only 5% of the blanket license, because they are only licensing that 5% of the entire repertoire, BMI and ASCAP's revenues go from $1000 per year to $50 per year, for example, from every such restaurant. If we get it, everyone else has to.

From another perspective, such a genre-based licensing would upset BMI and ASCAP's entire structure. Right now, since they don't know what songs are played in a restaurant, all of that money [with elevator music, shopping malls, stores, mechanic shops, etc] goes into the radio station pool, to be distributed based upon who is hot this week. We may play James Taylor songs in our restaurant, but Beyonce gets that money because of her air time. If BMI and ASCAP had to assign genres to their songs, the natural result would be mini-pools, where soft rock performers would want to get their share of the soft rock restaurant license money. The radio top 40 artists would be deprived of that income, and it would go to the rightful owners in at least a closer designation than the radio pool. When you consider that live music played in restaurants caters to the older crowd who can afford the entertainment restaurant, and that the catering means oldies, you would have all of the oldies performers suddenly getting royalties again, to their delight. Thus, the consumers win, the restaurant owners win, the artists win, and BMI and ASCAP bite the bullet.

When you consider the impact of millions of businesses demanding genre-based licenses at greatly reduces prices, it is billions of dollars in income shifting, and billions to the truly-entitled oldies artists. If you ask BMI and ASCAP, they flatly say it's impossible, since they have millions of songs in their database. However, if they simply set up a page on their site for the copyright owners to log in with an assigned username and password, they can assign their own genres to their songs, going directly into the database. I told them that they can hire a kid from a closed record store to help them assign genres, sine they feign inability. They also try to confuse the issue by saying that any song can be played in any style [the Triple Nickel case], but this is different: the song itself has an assigned genre, so if it's in the license of the restaurant, they can play it, and if not, not. What's the problem with that? They have no answer. The Department of Justice has not prohibited genre-based licensing, so it's only the BMI and ASCAP reluctance that creates the problem.

As long as they continue to defraud the public, saying that the restaurant MUST buy the blanket license, and that it is in violation of the Consent Decree to offer a lower price, the restaurants and other businesses paying protection money are just being shaken down. One irony is they they use their criminal plea bargain as the basis for their extortion. The other irony is that BMI and ASCAP are supposed to be helping their members, but since most of their repertoire are oldies, now, they're betraying their fiduciary duty to the vast majority of their members, and lining their own pockets with their commission from the overcharging.

Actually, it is now possible to write software that identifies a song being played. So, it would be easy to install a program that automatically analyzes each song played and charge per song. The licensing cartels do not do this, because they maximize their revenue by overcharging for a bulk license. The bulk license favors the songs that already hits, most of which are owned by the large corporations that back the licensing cartels.

Even though copyrights are issued to individuals, you typically have to sign away your copyright in order to get published. So, copyright is theoretically a system that promotes individual rights, but you have to sell those rights to the gatekeepers to get promoted. The Internet changes this somewhat, but the media cartel still has a lot of power.

If you know where to look, you can find royalty-free music. That's music you can legally play without paying any licensing fees. Maybe you should look into this and advise your clients to do this? If you made a collection of royalty-free music, along with a letter saying you legally reviewed it, that could be an interesting product.

The correct answer is "Intellectual property is not a valid form of property." Patents, copyrights, and trademarks all lead to legal extortion, as your clients are facing with music licensing. It was a mistake to allow them to be treated as property, but unfortunately that's the way the system is set up now.


commented on NFL Players Are Underpaid For The Playoffs And Super Bowl.
They can suck it up & play

Most have 1 job..like catch the ball ..they make plenty & beyond

People are starving & they are buying guns girls cars for heck of it.


MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.
If you posted the code in all languages, maybe we could crowdsource optimizations?

Also, are you familiar with ASM.js? It could go a long way in FF. http://blog.mozilla.org/mbest/2013/06/25/asm-js-its-really-fast-backwards-compatible-and-now-in-the-release-version-of-firefox/

Are you really interested? If someone's interested in doing that, I'll post it. The code only sort of works. It isn't polished.

Asm.js still isn't as fast as a native binary, but it'd be closer.

I do plan on finishing it, but I'll probably just have the calculation done on the server, with PHP doing a shell_exec to the C program.

It also would be interesting to try other languages, like Java, VB/C#.NET, Ruby, Python, etc. I still say that the C/C++ version would perform best.

MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.

*I'm* interested, but my career has been in C++, with a smattering of C# and Python. I have no serious Javascript experience.

OK, I uploaded my code. Here it is.

The Javascript is awful, because I wrote it before I learned jQuery. For the javascript version, you need the card images, so the page renders correctly in the client.

Hmm, the Javascript version runs faster when I turn Firebug off. I guess Firebug slowed it down a lot.

MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.

Just poking around at the C++ I get 250-300ms for each test (depending on targeting x86 v. x64, etc.) or about 8 million calls to evaluate_hand_96 per second (that's getting called about 2.6 million times). Which seems reasonable to me in raw numbers (this is on a 3.6 GHz i7, Win7x64, Visual Studio 2010), coming in at around 450 clock cycles per evaluate_hand_96. I tried running it through VTune Amplifier but I think the profiling doesn't give helpful results because the inner loops are so small that sampling isn't terribly useful. I tried removing the function pointers and converting some logical ops to arithmetic ones (I think I shaved off 50ms, but it could be a result of the optimization settings).

I've read the code enough to understand the structure, but I haven't looked to see why the inner loop is getting so many calls. Assuming that's really how much work needs to get done, I don't see an obvious way to tune it up without multithreading, etc.

I haven't looked at the other code yet (I will over the weekend), but you can contact me at the included email if you like.

1. Multithreading kind of defeats the purpose, because I want to compare Javascript, PHP, and C/C++.

1.a. When I want to run it to loop over every hand and make a full strategy table, I can do multiple processes.

2. I think that's one advantage of C++ with full optimization. It inlines the functions.

Also, Visual Studio, when you compile for release, automatically turns on full optimization for you. With gcc, I had to remember to do that myself on the command line.

3. The overhead for a function call is MUCH LESS in C/C++, compared to Javascript or PHP. (especially for code like this, where I'm not allocating many variables or using the heap)

4. If you optimize the code in one language then, to make it a fair comparison, it has to be optimized in each language. I thought that the exact same algorithm in each language would be the most valid comparison.

The inner loop gets so many calls because, when you draw 5 cards, it needs to evaluate 47*46*45*44*43/5! possibilities for what you could draw. When you draw 4 cards, it needs to evaluate 47*46*45*44/4! possibilities. That's a lot of iterations. Drawing all 5 cards is stupid sometimes, like when you have a pair, but for completeness I always check every possibility.

Also, I put the function pointers in, because I want the same code to work with multiple video poker variants. I'm also doing Double Joker Wild, which means a completely different function to evaluate the hand. Other video poker variants give a bonus for certain 4-of-a-kinds, which also would require a completely different evaluation function.

MP commented on FSK Benchmark Test - C/C++ vs. Javascript vs. PHP.

Yah, I figured that sounded like it was about right for the combinatorics, but doing a quick calculation of 47 choose 5 comes up with 1.5e6 not 2.6e6. I figured multi-threading was out for purposes of comparison, and that any optimization for one language should be for all--I just tackled first what I know best.

47_choose_5 is 1.5E6. 47_choose_4 is 1.7e5, but you draw 4 cards 5 times (5 different possibilities for holding one card).

When I do the double joker wild variant, it'll be a 54 card deck.

Also, I don't want the code to take shortcuts, by making assumptions such as "always hold a pair". In some video poker variants (especially with wild cards), a pair is a bad hand to hold. I could take shortcuts by making the code more intelligent, but that would limit the ease of modifying it for various video poker variants.

FSK Benchmark Test – C/C++ vs. Javascript vs. PHP

Very frequently, you read benchmark claims for various languages. Those claims have lots of problems. First, they usually are a “Hello, world!” program, and not complicated business logic. Second, they usually compare optimized code in X vs. poorly written Y.

I decided to write a “Video Poker Trainer” program. In video poker gambling, you are dealt 5 cards. You choose what cards to hold, and then draw new cards. Based on your final hand, you receive a payout.

Some video poker games have a payout close to 100%, but the strategy is complicated. The casino advantage comes from the fact that many people make suboptimal plays. Therefore, it would be useful to have a program that helps you practice.

My program solves the video poker hand by checking all the possibilities. There are 2^5=32 possibilities for what you hold, and then 47_choose_n possibilities for draws, where n is the number of cards you draw. I wasn’t intending to do this as a benchmark test, but when the performance of my first version was unacceptable, I wound up rewriting it in several languages.

All of this code is running on my desktop PC.

My first try was Javascript. My goal is to make a browser game. To solve one hand, it took 48 seconds in Firefox, which is unacceptable performance for an interactive game.

I then tried Chrome (V8). There, it took 1.6 seconds! That’s a substantial difference compared to Firefox!

However, 1.6 seconds is still unacceptable for a game. The browser window would freeze while the calculation ran. I could sprinkle SetTimeout during the calculation, but that would make it take even longer. Also, if it’s a browser game, I can’t assume that the client is using Chrome.

I rewrote the code in PHP. It was the exact same algorithm, changing Javascript syntax to PHP syntax and leaving it otherwise the same. (I did make some minor enhancements. The Javascript version had a hardcoded hand evaluation function and paytable. The PHP version used function pointers and a paytable parameter, so it could support different games.)

I was shocked that the PHP version took 3 minutes! I thought PHP would beat Javascript, but it was worse!

I could have tried HVVM (Facebook’s version of optimized PHP), but didn’t.

My final try was C/C++. I expected that C would clobber everything, including Chrome/V8. Again, it was the exact same algorithm, changing the PHP syntax to C/C++ syntax.

I was surprised that the C/C++ version took 1.6 seconds, the same as Chrome/V8! I was pretty shocked by that.

I probably could go back and tune the code, but to be fair, then I’d have to do it in all 3 languages. To make the comparison perfectly accurate, it should be the exact same algorithm in each language.

It wouldn’t be a proper experiment if I got the answer I expected. I thought that the C version would clobber everything, including the Chrome/V8 version. Instead, C and Chrome came out tied.

Oops, just as I finished this post, I realized I made a mistake. I was using gcc WITH THE DEFAULT COMPILE OPTIONS! I tried again with -O3 full optimization flags! Now, the C version takes 0.6 seconds, coming out ahead of V8, like it should. My confidence in C is restored. (For completeness, -O1 took 0.71 seconds, -O2 0.61 seconds, -O3 0.60 seconds.)

Another improvement, “gcc -O3 -ffast-math” took 0.57 seconds! (I don’t mind an error in the 7th decimal place, since this is a game, so -ffast-math is a reasonable compiler optimization.)

The benchmark comparison was on my desktop. Moving to my Linode (using g++ instead of gcc), the unoptimized version took 1.3 seconds per hand. The -O3 version took 0.36 seconds per hand! (Actually, because the Linode is shared, the time it takes to run depends on how much the other users are using the server. I got a range of 0.36 seconds per hand to 0.5 seconds per hand.)

My initial conclusion, as I was composing this post, was that Chrome/V8 and C had equal performance. However, I was making a big mistake! I wasn’t turning on optimization settings in gcc! That shows how a poorly conducted benchmark test can lead to false conclusions. I almost made that mistake myself! (For Chrome/V8, I was using the default settings. I don’t know anything about extra optimization settings in Chrome/V8.)

The game still isn’t finished. I just wrote the code that does the calculations. I’ll put it up here when I”m done. It looks like only way to get acceptable performance is to shell_exec call the C program that does the calculation, and then serve that to the client. If I’m just calling an external C program, it doesn’t matter what language I use on the server, but I’m going to stick with PHP because that’s what I like the best.

It’s also educational to write the same algorithm in multiple languages. By the time I got around to the C/C++ version, I was making sure it was proper reusable code, so I could use the same function to solve multiple video poker variants. I plan for my actual program to work on 9/6 and Double Joker Wild. (Double Joker Wild and 9/6 are two video poker variants. 9/6 has a house edge of only 0.6% played perfectly, and Double Joker Wild has a house edge of 0.09% played perfectly, making a practice program useful. Adding wild cards means I need a completely different hand evaluation function, which is why I had to make that a function pointer.)

I made a benchmark comparison of C/C++, Javascript, and PHP, by writing the exact same algorithm in 3 languages and comparing the run time. The code was exactly the same, merely changing the Javascript syntax to PHP or C/C++. Surprisingly, PHP was the worst, taking 3 minutes to solve one hand. Firefox Javascript came in second at 48 seconds, still horrible. Chrome/V8 and unoptimized C/C++ came in tied at 1.6 seconds. I almost came to the false conclusion that Chrome/V8 and C were equal, because I forgot to turn on optimization in gcc. When I turned on full optimization in gcc, the C version took 0.60-0.57 seconds per hand, which is nearly 3 times faster than Javascript. As I expected, C/C++ was the fastest, but only when I remembered to turn on compiler optimization.

An Example Of How Banks Steal Via Derivatives

It’s been awhile since I’ve been posting. Recently, I decided to participate in a flamewar in a Internet forum, something I haven’t done in awhile. I’m also posting my analysis here, so it isn’t wasted.

In this thread, I mentioned how negative real interest rates feed derivatives markets. I’m posting my example as a separate thread.

>FSK
Can you walk us through that math?
I buy a call, bank sells it. For example, if that works as a start.

>Complex financial instruments do provide some value in some places. For example, they’re a relatively cheap form of insurance in some instances; say, an airline wants to lock in the price of jet fuel. But they’ve been very poorly regulated and net net, their cost to society exceeds their benefits.

Actually, that was the example I had in mind, an airline making an oil price hedge. I’m more familiar with the rules for equity markets, but futures markets are similar.

Suppose the airline wants to hedge the price of oil. Suppose they decide to buy a $1B underlying 1 year call spread, locking in a price range of $80-$120 per barrel. (i.e., they pay at most $120 and at least $80 per barrel, and if the price is between $80 and $120, that’s what they pay).

The airline enters a derivatives contract with a bank.

The quant at the bank is using the Black-Scholes pricing model. The bank borrows money and buys oil futures, hedging the trade with the airline. The bank can borrow money at the Fed Funds Rate (or 1 year Treasury Rate), say 0.25%. The implied interest rate in the option contract is 0.25%.

However, the bank adds on fees and spread when they sell the call spread to the airline. What the airline actually buys has an implied interest rate of (say) 3%.

This is a great deal for the airline. If the airline issued bonds to finance their oil speculation, they would pay 6% or more. They instead got to borrow at 3%, via the derivatives transaction.

This is a great deal for the bank. They are borrowing at 0.25% and lending at 3%. They are taking on some risk that they misestimated the volatility or don’t hedge correctly, but it’s a positive expectation bet for the bank.

Also, true inflation is 10%-20% or more. On average, oil prices will go up at least 10%. It’s a great deal for the airline to hedge at an implied interest rate of 3%.

Both parties book an immediate profit on the transaction. The bank is borrowing at 0.25% and lending at 3%, a sure profit for them. The airline is borrowing at 3% instead of their normal cost of capital of 6%, a sure gain for them, especially when you consider that oil prices will (on average) go up 10% or more per year.

Where are these profits coming from? Is it because the bank traders and airline hedging desk are such geniuses? That’s what they think, but that’s not what’s actually happening.

When the bank borrows money to finance the transaction, they are borrowing BRAND NEW MONEY from the Federal Reserve, either directly or indirectly via another bank. This new money causes inflation. The inflation caused by this new money is actually greater than the profits earned by the banker and airline.

So, the airline and bank make a profit. But the rest of society experiences greater inflation and greater prices. Via this mechanism, wealth is transferred from the average working stiff to the big banks and the large corporations that get to borrow cheaply. Also, this mechanism usually destroys wealth; the inflation caused is greater than the profits earned.

You can say that the banker is a swell guy for making the airline more efficient. However, it’s a corrupt financial system that makes this transaction profitable. It’s impossible to have real reform, because the big banks literally have an unlimited lobbying budget. They get this huge firehose of free money via negative real interest rates, and spend a lot of that free money lobbying to keep the scam running.

Some people say that banks do good things when they finance businesses. However, they rigged the monetary system so that borrowing from the bank is the best option. With negative real interest rates, borrowing is always going to be more attractive than reinvested earnings.

It’s a very clever scam. The details are not taught in school, on purpose, to keep the slaves clueless about what’s going on. It isn’t taught in “mainstream economics”, because the #1 employer of economists is the Federal Reserver. It isn’t an accident. The people who set up the financial system knew exactly what they were doing. They set up all kinds of smoke and mirrors fake reforms. The real problem is negative interest rates and a corrupt monetary system.