Tuesday, October 27, 2015

Learn C "the hard way"

I came across this book stand out among the bookstore's bookshelf.

Seems like some reverse trend of ..For Dummies books. The author actually opens the whole book up on the web so you can look here.

Now, you decide if you want to endorse this book or learn C from it.

Its Exercise 0 says: get Ubuntu Linux if you're on Windows, and install XCode if you are on Mac (and search online for "installing xcode")

and it also warns against an IDE: Don't use an IDE. An IDE, or "Integrated Development Environment" will turn you stupid.

Exercise 1: where is that #include statement needed to compile puts?

The rest of book... seems to put things out of order of how I would introduce things... uh hem, I saw // this is also a comment, sorry but that is C++.

So I think... this hard way book is just a bit too confusing and not necessarily hard. Yes, C runs fine in Windows too, the author seems to think Linux is the only viable OS in the world. There are plenty of C tutorials out there, I'd go online to search for "learn C" instead of buying this book. and I beg to differ that an IDE turn you stupid.

Monday, October 26, 2015

JSON formatting

JSON is such great alternative to XML as Javascript natively understands it. But it can also get complicated... and there is no description like XML describing what you are looking at. And on the java side, there are many tools too. For example: Jackson. see http://www.mkyong.com/java/jackson-2-convert-java-object-to-from-json/.

A formatter definitely can help you look at it in a clearer way. Here are some:

http://jsfiddle.net/AndyE/HZPVL/
http://www.freeformatter.com/json-formatter.html

Here is jsfiddle that you may find useful.
http://jsfiddle.net/AndyE/HZPVL/

Tuesday, October 6, 2015

Madman shooting again

Before I comment on yet another mad man shooting on campus, first I want to stab one (last) time for Windows 8.

Once upon at time there was a cartoon on the News app that I wanted to alt-print-screen to download but I couldn't. In the cartoon, there was one guy saying something like "Gun Control! We need less guns". The next frame is another guy that says "No, we need MORE guns! Gun laws are useless." Then the next frame says, "See you after the next massacre."

Here we are. How true is this cartoon.

Another unknown man just wants to be known by shooting people then himself. Some details here.

Just how do you prevent such tragedy, everyone carry a firearm to everywhere as "the only way to stop a bad man with a gun is a good man with a gun?"

Some guys say "It is not about gun laws it's about mental illness". Maybe true, but why is the guy legally having so many guns.

And no, I don't think teachers should bring guns to school. I cannot agree more with this gentleman. http://www.cnn.com/2015/10/05/opinions/parini-donald-trump-guns/index.html.

And how many people died in this incident? 10. Many more died in separate incidents in Chicago alone in one day and many of those are probably NOT about mental illness.

Enough of this. People should be working as hard as president-wanna-bes on taking action to implement buy-back program or do what it takes to get guns out just like every other sensible nations out there.

If every household has at least 1 person killed by madmen with guns, perhaps this nation finally will realize.

See you at after the next massacre.

Monday, October 5, 2015

London Revisited

So I visited London again. This time for no reason at all! Theoretically the client has request my presence during launch but it isn't justified in the first place I do not need to be present there physically when there is the internet. Oh well, so the project is delayed again and I just wanted to spend opportunity to do one more walk around.

So I headed for the Buckingham Palace! Not in some remote place but right in middle of London, reachable by the Underground (trains). Yes I saw the famous long black furry hat soldiers marching. A giant building but with crumbling walls. It isn't a castle. There are streets and streets of classic stone buildings all over at uniform height.

Headed for some shopping place on Regents street. London makes Michigan Ave look very pale. At high end stores I only see wealthy Chinese shoppers and even the sales speak to them in Chinese. Now only wealthy Chinese can afford these ridiculously expensive (probably Chinese made) products.

I especially liked the Hamley's toy store. Makes the biggest Toy-R-Us you have seen look pale. I do not know of any big toy stores in Chicago. There are floors of toys and MANY enthusiastic sales people demoing the toys. Not very cheap but everything in London seems so expensive. It is celebrating 255 years. Yes, two hundred fifty five. How old is the United States? London still have a few bookstores. Guess Amazon didn't kill them all yet. But I do not see coffee shop within.

As I have notice before. No half-and-half in Europe. Whole or Skim milk with your coffee, or just black.

Suddenly the tune "London bridge is falling down" came to mind... ah, accessible by train too! Let's go there! The bridge itself is actually not so elaborate but the Tower Bridge next to it is. There is a giant WARSHIP for display.

Unfortunately "Chinatown" did not come to mind until after my day of walking... should have went there to see. Yes, google map street view can take you there. But I want to see what kind of food they serve, hear what language they speak, perhaps talk to a couple people. Oh well.

Shakespeare's Globe Theatre is still around. But unfortunately didn't come to mind either. Hey I didn't know I get to travel around for 1 day.

Now, the most famous dish at London is "Fish-and-chips", which is fried fish fillet and fries. I had some. Tasted just like here. They call fries "chips". What do they call real potato chips? They call it "crisps". I think "crisp" is probably a better term for it.

Now, what about "porridge"? In some Chinese restaurants, it is refer to the tasty morning rice soup. I decided to spend a few pounds to find out. Oh it is oatmeal! Would not have spent that pounds on that if I know.

Finally, on the road there are lots of speed cameras, well those are everywhere else too. But look a that sign

It is the old original camera! They don't use that to capture speeders don't they?