Wednesday, April 30, 2014

Government says: Don't use IE

The government says don't use IE... any version from 6 to 11. See here. So if you are reading this with it. STOP. Open up Chrome or Firefox. (or your phone, ipad, etc).

Now, article says from 6 to 11... so is IE 5.5 safe? Using IE and get infected is hardly anything new. But are Firefox and Chrome completely safe from other things? I doubt it.

Should you just dump IE and go with Chrome or Firefox? Many people give a resounding "Yes". See here for instance. That ActiveX thing is too easy to misuse.... that standards support is poor, and it is painful to debug a broken IE page when it supposed to work. That F12 tool stinks compare to Firebug and Chrome.

So, perhaps listen to the government this time. Dump IE. Especially idiot die hard corporates stuck on IE7 and not allowing people to install other things.

Ouch a black eye for Microsoft. Wipe that grim off your face, Oracle. Not too long ago Homeland Security say don't use java also. See here

Monday, April 28, 2014

Atari 2600 ET unearthed

Look! The legend is true...Atari E.T. cartridges found at the dump! Details here.

This is a very interesting economics lesson: over production... over predicting demand. and even the market leader can fail.

Ok, 30 years ago there was no internet. If you want to play a game you must own a physical cartridge. And... Atari was pretty much the only game console in town. Its graphics ability is so inferior to games you play with quarters... But given Atari was the only game console even if the game sucks if you want to play you need to put up with it. That Pac-man only face left or right and the ghosts flicker.

Now that home games catch up the arcade industry is totally dead. No one will pay quarters to video games now. But modern games are too immersive you got idiots-who-needs-a-life play all day long.

There was a big 1983 video game crash. Well that wasn't for ME. Most people already played enough and tired of those games but I have not get my hands on it before 1983 unlike the spoiled kids. I spent quite some hours with ancient Atari games until maybe 1986. I did remember seeing a lot of E.T. cartridge available.

E.T. is generally considered the worst game of all time... While it was not super fun, I do think it is not the worst game ever. I was able to finish this I remember. My vote for worst game would be that Swordquest. You basically walk around and have no idea just what you're supposed to do. ok, it is Atari, such low powered machine by today's standard... you just can't expect this to do too much. That Space Invaders and Missile Command were quite successful? But they were so simple! E.T. and even SwordQuest actually has better graphics and have some depth.

Ok I got a question? why dig the garbage for the millions of dumped cartridges?

If you want to play old Atari games, go to atariage.com.

And for those title-inflated senior programmers, architects, software directors who say Atari games suck. I challenge you to write a Pac man game. Even with modern computer with a ton of memory most probably don't even have any clues to where to even start. The Atari has a only few K of memory to work with, for the record, so it is fairly amazing to make a playable game on those old systems.

Tuesday, April 22, 2014

Middle Aged Mutant Ninja Turtles

The Teenage Mutant Ninja Turtles are back... with toys and stuff and a movie on the horizon. No, I was never a big fan of the ninja turtles. It is another 80s TV series that are dormant for years and coming back with Megan Fox like the Transformers. Now if you were really a teenager watching the ninja turtles in the 80s... now you are a middle age guy. Perhaps it may be even better idea to have the turtles grow and introduce some new younger turtles. Even if you do, it will be hard to tell them apart. The TMNT becomes Middle-Aged Mutant Ninja Turtles now.

Now this series has martial art theme wrapped in originally sort of cute turtles... now with increasingly darker theme it seems. So this is a kung fu movie in disguise.. and kids, those weapons are dangerous. But people just like to see action.

It is interesting phenomenon that new movies often need to revitalize old ideas from previous decades, perhaps aiming for middle age guys bringing their kids to the movies. Oh that TMNT video game is extremely difficult (along with the Simpsons too). It is just impossible to go long on a quarter... and gets repetitive if you keep pumping quarters in.

It seems that the TMNT story can be limited... there are just 4 (and no more turtles). Yes there is April and the si-fu, but hard to introduce new characters (like the Transformers can)

Yes you punch bad dudes, rescue the girl, eat pizza... what else?

Thursday, April 17, 2014

SFII CE: Verifying number of possible matches

It was 1992 when the Street Fighter II Champion Edition (CE) came out. The ad in gaming magazine says "It is Boss vs Boss". Wow, now you can see who really can use Guile. (But Guile's power has toned down ever since). Now you can use that M.Bison flaming pyscho crusher! There are other things that forces the game to change... how does Vega do that climbing move when you don't have a cage on every stage?

Look, there is a number on the game cabinet. "78 possible matches".

How do you get that 78? You have 12 characters to choose from, and you use 2 at a time.... and order does not matter (Ryu vs Ken is same as Ken vs Ryu).

That sounds like the need for Combination, with n=12, k=2.

Well I am playing with Ryu, I am not going to bother calculating this.... and 20+ years went by. Ok, it isn't hard to carry this out even without a calculator. The big (n-k)!=10! just cancels out. So you have: 12×11/2 = 66. It is not 78.

Oh did the Capcom guys have it wrong? or did I have it wrong? Look this is a real-life math situation. If you are to draw that cabinet art and your boss ask you to put the number of possible matches you need to do such calculation.

Ah look at the ultimate feature on the lower right: Ken vs Ken! 66 + 12 mirror matches = 78 possible matches! It feels great to solve a problem (like verifying an answer for an odd number question from the back of text book)

Now, can you figure out the number of possible matches for Super? (16 total). Oh in Super-Turbo there is this Akuma! I may wait another 20 years to carry out such calculation. So I am going to use the textbook trick: leave-to-reader.

Wednesday, April 16, 2014

HeartBleed

It is hard not to hear about HeartBleed and its logo. Every where you look: news, company bulletins and emails... it is everywhere.

This is the a bug in SSL with a catchy name and somewhat scary logo... This is the very foundation of security of the internet. Most people will have no idea what this is. Yikes it has been out for so long, just how many passwords are taken? Ok, even if it does not get fixed, how many people actually know how to steal data? Fortunately, not many. There are just so many not-so-sophisticated people out there. But unfortunately it doesn't take too many sophisticated hackers to steal your data and do some damage.

Great coverage of this in Wikipedia: http://en.wikipedia.org/wiki/Heartbleed.

Oh this is... C!

Oh, these OpenSSL guys write their own malloc and free? and oh, this is a bounds checking issue.

It is entertaining to read these code changes: See here.

Now there is some 1 + 2 thing...(probably has to do with particular bits) and pointer madness. I am glad I am not assigned to fixed this.

Such important code... is it properly tested? Alas, if they work with typical QA that I have seen, they will probably ask: "how do you test this". For the record: No bus drivers ask me how to drive a bus. Some will even ask "Did you test this? where is your unit test plan." I hope you work with better ones.

Now is there more vulnerability to this code? I hope there are ethical experts out there who really tested this (and not turn a bug into hacking profit)

Tuesday, April 15, 2014

Divergent Series

If you tour around bookstores or pay attention to the movies... you will see nowadays kids read the Divergent series. Kids have strong demand of good reading materials... They yearn for it. This sure is encouraging for novelists. Now I don't have a clue what this is about other than it must be some teenage heroes and heroines saving the day somehow. (Isn't that an element of just about every story?)

Some teenagers may also encounter a different type of divergent series... You guessed it. A series of numbers when you add them up do not total to a specific number. It "escapes to infinity" as some say. Excellent coverage right on wikipedia: here. (and I actually understand so little of that to be honest)

Now just why the heck do we care of a series converges or diverges. One reason is this: so you can make some use of calculus 101. See here. I find this the least interesting topic of calculus. Yes, you don't need this in "real-life".

But it IS interesting that the harmonic series: 1 + 1/2 + 1/3 + 1/4 +... diverges. Each number gets smaller of course but this is not coming down fast enough to converge as in 1 + 1/2 + 1/4 + 1/8 + ... And in the old days people don't actually have computers that you can write a little summation loop to verify yourself. Here do a little for loop and add 100 items to see for yourself.

One Fish, Two Fish, Are you sure?

You may have seen this (popular) Children book:

While this isn't much of a story some kids may find this book interesting.

Ok, look at its title, just HOW can a book get the title wrong. The number two demands plural.. so it should be two fishes!

I argue with my 4 year old that it should be fishes but I stand corrected. Both fish and fishes are ok. See here. Can you think of another word that has multiple plural forms?

Thursday, April 10, 2014

Responsive Web Design

Heard people talk about "Responsive Web Design"... at first had no idea what they are talking about. Isn't all web site supposed to be responsive? Who would design something that is not responsive and just show the hour-glass icon?

Then later I saw some job opening having that as a bullet. Now that makes me look up what this is.

Oh so it is some style techniques so it responds to what type of device you have. After all, a web page nowadays can be seen on various browsers and also tablets and phones and you want to show things differently.

So you need some clever css techniques. Here is that landmark article: http://alistapart.com/article/responsive-web-design

More in depth discussions, for example: http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/#more-75660

Did you just say "how the heck am I supposed to know?" That's a good question. Usually I focus on coding and let somebody else worry about styles. But I need to have some idea what people are talking about.

Tuesday, April 8, 2014

Goodbye Windows XP

I've read SO MANY "Tech news" article on the end of support for Windows XP. And in most of these articles there are reminders saying Microsoft has made Vista, 7 and 8 since XP. (You must live under a rock if you don't know) So update or virus will get you.

Now if you really bought a machine in early 2000s... you probably need a new machine altogether. You get a decent machine for less than $500. Unthinkable price when XP was first out. You can turn your old old machine into Linux... or just to play old games.

Now, are Microsoft's patches invincible? How many XP machines get infected even if they have all the patches? Even with latest anti-virus running you still can get virus. In general you just DO NOT surf the wild web on Windows machines... too risky. Go only to well known sites. Try a more robust thing such as Android or Chromebook. There is NO registry for virus writers to hack.

Oh and they say 95% of the ATM machines are Windows XP.

Now are the ATM on the web? I suppose they make some webservice call to update your account somehow. Are banks doing anything about it? Doubtful Well they are not adding some smart card chip in credit card for more security. If it cost them money, even little, banks won't do it.

I thank Windows XP for years of faithful service. the oval start button was a eye-opener. It used to be a boring rectangle from Windows 95/98/2000. See, that upgrade worked well. People get prettier stuff from 95/98. It was a positive upgrade eXPerience.