Friday, June 28, 2013

C++ Revsited: Do you really know C++?

I haven't work with C++ for YEARS. I think I know my C. I like its simplicity. (Though pointers are hairy). There are plenty of bozos who just use // in comments and cout instead of printf and claim they do C++. Well, yes, that... is using C++ as a "a better C".

Do I know C++? Yes, I know some aspects of it. The OOP of C++ is of course much more straightforward than Objective C. Sure, define class like a struct, use ":" to derive subclass. Label your methods public, private, protected, and you don't have to label each method like in Java. Ok, that "virtual" keyword is a bit confusing too. Hey Java can do it without this keyword.

However, much of the world wants web applications. Is it even possible to write a C/C++ web app? Java is much more straight forward for that with plenty of library to use. Good bye C++. I said goodbye to C++ for decades.

Ok, people are not going to quiz you basic stuff. Do you know about Run Time Type Information (RTTI) and its related keywords:

  • static_cast
  • reinterpret_cast
  • const_cast
  • dynamic_cast
Waita minute was these even invented when I work with C++ in college? Um, I am not so familiar with these but my question is... why bother casting your objects around that much. Read all about them here.

Thursday, June 27, 2013

Celebrate equality?

These days the Supreme Court is in the spotlight. They support marriage "equality" and they strike down part of the part of the landmark Voting Rights Act of 1965. (Why bother the Voting Rights Act? ok that's topic for another day).

No one is opposing loud about same sex marriage now. Do you hear any more opposition? I hear none. Only seeing people waving colorful flags jumping up and down celebrating.

This means: "family" has changed. It is now any combination. One-man-and-one-woman marriage's success rate is so low anyway. Kids biologically born into a family with mom-and-dad are so few that soon they will become extinct. Everybody just have total freedom and no commitment and Plan B pills will be available to anyone, so celebrate. Toss that Bible away. Face it, you don't read it anyway. If you read it you don't respect it anyway and you interpret it anyway you want.

What will future generations be?

To me, this isn't something to celebrate. This is getting too complex.

Look, the original plan that people instinctly do pretty much for thousands of years is this: you are raised by a family of mom-and-dad. You grow up, marry someone of opposite sex, and create another family of mom-and-dad. This is across most (if not all) cultures, across continents, across languages... This is ... human. This is changing because family is no longer mom-and-dad, and in such family at most one of the parents can be biological parent. Perhaps I don't understand the word "equal" but this is to me... isn't "equal".

There is no more debate needed... no one, not a single person is now opposing same sex marriage. They have clearly won.

Wednesday, June 26, 2013

Start button coming back and making headlines

I have seen more than 1 news article about the Start button is coming back in Windows 8.1. See here. Microsoft give in. Yay?

This basically just a button link that takes you to the Start page. You have to live without the pre-8 Start button (unless you download a third party tool). This is better than the helplessness of not able to find your programs to launch. Hey, *I* tried to create such thing with VBScript that simulates a key sequence. See here for reference. Nope, there isn't a key for the hardware Windows button.

Hardware button is tyranny. I disliked the Apple button on the Mac and the Windows button on Windows. Keyboards is supposed to be standardized I should be able to pull one keyboard from one machine and plug into another. Hey that's the beauty of USB but the tyranny of OS required their button with their brand which I am not so liking.

You should be able to boot to desktop and not see any of those stupid tiles. It is just minor annoyance. I see it for only a split second before I press Windows-D.

I do not predict 8.1 will make Windows 8 sell like hotcake as in Windows 3.1.

Why is no one wanting Aero back and have to put up with flat things like in 3.1?

Tuesday, June 18, 2013

One weekend: 46 shot and 7 dead

No I am not talking about Iraq, Pakistan, Syria... This is happening right here in Chicago on the Father's Day Weekend. See here for details... 7 dead, 46 shot (yet the <title> tag of that news page says 6. Oh, additional request for the Tribune: can that article give me a google map with markers?)

If you read this news in some sites with readers able to post comments, sometimes you will see people mocking at the gun laws... "Look, Chicago has toughest gun laws around and look!" Ok, so are you suggesting arming every man woman and child in Chicago to reduce the number of crimes?

Just why is there so much conflicts? Is it economy related? If people can find work will they prefer making money instead of killing their enemies?

If I have a database I want to query: what is the success rate of catching killers? Is the penalty big enough to provide any deterrence?

Is there a way to stop this nonsense? More cops. Sure. but no one wants to pay for them. How about surveillance cameras everywhere and someone is going to object intruding their privacy (there is actually plenty of them out there). Education you say? This actually can work. But are there enough people willing to do this?

"Oh my God! Oh my God!" exclaimed one victim's father.

Dear God please help these helpless folks.

Monday, June 17, 2013

Windows Annoyance (part 9) - the news app

The full page News app nags to be upgraded by occupying that first news item. Ok I updated it. Why is it now in Times New Roman font? Should it be that Windows 8 font? Ok, whatever font is ok as long as it is not Courier New.. fine.

Now the first page news headline is scrollable (to the right only of course, due to the idiot narrow-horizontal-long screen design). When you click on a news item you get PAGING only interface. You better be absolutely done reading the page (columns of reading up and down) before going to the next. Come on, paging interface... is it a step backward like the 1980s Hercules apps you see bank workers use?

Fine. I can also live with this.

Boom it likes to CRASH with no error dialog box, no BSOD. just takes you right back to the Start page. And when I try again it usually works.

Speechless.

It is amazing to see king of software heading straight down to oblivion as everyone will soon abandon it if it continues to suck. 8.1 better be much better.

Don't get too happy here Apple! Your Finder stinks. Learn a thing or two from Windows' Explorer.

Friday, June 14, 2013

First look at Scala

There are so many newer programming languages out there. Perhaps one of these can solve your problems quicker. If your colleagues are talking about it, and you perhaps see job postings regarding it perhaps it doesn't hurt to take a look. I decide to look at "Scala". No, it is not pronounced "scalar" as in a non-vector simple value, it sounds more like "scholar"... ooh it supports multiple "paradigms". It can act like a functional language and a traditional OOP language... and it runs on the java virtual machine and can interact with java...

The book I picked up quoted James Gosling, the father of Java, "If I were to pick a language today other than Java, it would be Scala."

Now that's some endorsement.

Ok, a first look of this reminds me of Pascal! So why are variables are defined Pascal-style in a C-descended language that is supposed to work closely with Java? Oh, and the type is not always needed (like javascript)... The world now prefers dynamic things. There is a lot of syntax to this language.

I found an awesome spin-alot great presentation for Scala in: http://scalacamp.pl/intro/#/start. It is made by the now-that's-impressive impress.js. That makes regular Powerpoint slides feel like dinosaurs (but is simple slides more effective than overly rotating ones?)

Tuesday, June 11, 2013

News priority

So I was reading news on some news site... the headline in big bold at least size 40 was about iOS7. Sure Mac got its fanboys and ooh pretty iPhones and stuff... Ok but from what I can see, they are minor improvements and not worth such big headlines when there are more serious problems going on.

Santa Monica. Beautiful sunny place. Bloody mass shooting again by an mentally disturbed man. This time it is not 6 year olds so it seems not getting as much attention as Newtown. Although Obama tried hard to push some sensible gun control but that failed. He is probably not going to do anything about it as there are more scandals/problems/issues to deal with.

This country is hopeless in containing this type of violence. Who cares. Let's just see what Apple can give you next.

Wednesday, June 5, 2013

13 Original Colonies

Read some children history textbook lately... and I never bother trying to list the 13 original colonies. Those are the ones on the right-hand-side of the map, alright.

And oh, I just learned Vermont and Maine were NOT among the original 13!

See here.
Somebody is going to say, "so what, that's useless! unless you go to Jeopardy or something." What do you say to such naive beings?