Wednesday, August 27, 2014

Learning

So far I've learned so much from +Bob Tabor, I'm thankful to him for each and every series I watched (JS fundamentals, C# fundamentals, WP8 fundamentals). Feeling so enthusiastic after learning new technologies that I've cooked some basic applications in the fields. Looking forward to build something bigger. All I need is a little more time.
Happy learning!

Saturday, August 23, 2014

Summers

It's been a long time since I wrote something that is actually about me. Well, here I am spending my summer vacations quite in the way I planned in last semester (huh! what a bad time it was). I actually planned a lot of things to do in summers but I always plan more than I can do so that I do more and more. I am watching movies (a lot), television series, playing games, learning a few things. Recently a lot of people (mostly juniors) have asked me what to do best in summers so that at the end you don't regret that you wasted whole a lot of time doing nothing. I told all of them, "do what needs to be done." Really you should go with your heart. You want to play games? Play them like day and night (literally only stop to eat). You want to go on a tour to some northern areas? Go far away from north. But at the end you shouldn't regret. Regrets are something you keep regretting your whole life.
What I am doing right now?
Well, I am watching Game of Thrones (nearly ended), The Strain and I wish I could mention The Big Bang Theory (God, I miss that badly.)
I am learning C# from learnvisualstudio.net (a video lecture series compiled by Bob Tabor, really a good one for absolute beginners).
I am reading some books to cover the old topics from data structures course and discrete mathematics.
I plan to hit a game in future (in some days) before I leave for Karachi (still planning).

Thursday, August 7, 2014

The `override` Keyword in C++11

Since C++11 has been released, a lot of new things are added in newer versions of working draft (available at http://www.open-std.org/jtc1/sc22/wg21/). Recently I've come to know about the `override` keyword (which is not actually a `keyword` but an identifier with a special meaning).

A very good description with code example is given in this link below,
http://stackoverflow.com/questions/18198314/override-keyword-in-c

Key points are,
  1. Works with virtual functions.
  2. The identifier `override` makes sure that the base class has the same function signature if you write override specifier after some virtual function in derived class.
  3. Quoting working draft C++11 N3242 (published on 28-Feb-2011),
    If a virtual function is marked with the virt-specifier override and does not override a member function of a base class, the program is ill-formed.

Initializing a Constant Pointer

A little off-road but still something was whispering in my head, "can you initialize constant pointer pointing to constant pointer pointing to constant pointer pointing to an integer constant?". Well why not.
Trick was just to send initialized pointers into initializer of previous pointers.
Normally you don't need this scenario. Though creating constant pointers and putting a lot `const` specifiers in a pointer declaration makes the pointer `safe` to be manipulated.

What if you need to initialize an array if you've the same pointer declared. It can be way more tacky and might result into `impossible`.
You can simply declare a pointer and pass it to the function where the parameter is accomplishing all that safety you require from some critical section you want your pointer to stay safe in.
For example,

Saturday, June 21, 2014

Something Touchy

"Only as much as I dream, can I be."

Your mind is your steering and life is the road. It is like a joypad in the game of your life. Whenever you want to score good in this game, you've to concentrate on each and every detail surrounds you. You control your aims, choices made in life lead to them.

Think bigger than you can think!
There is much out there for you to learn. Don't stuck in some loop forever.

You're the product of your own imagination.

Saturday, May 10, 2014

One More Day To Go

What a hectic week it was, hardly slept for 3-4 hours daily.
According to my point of view students should be given some break to do things. All at once and that much “all”? Phew. Well it is all over now.
Got a weekend to do fun. Make all those wishes come true, I was waiting for, each and every damn second. First thing to do on the list, “get a really long sleep”. Sleep like I’ll get up when I want. Secondly, what? I didn't think for second one. So all I have to do is to go and get some sleep. Good night.
And yeah after getting this sleep, my plan is to make a dictionary software by reading the large data file I have in Java. Good luck to me.

Saturday, April 19, 2014

Imagination

Another thing from my diary. Hope you like it.
"A person who can count the leaves of a tree out of some seed that needs to be planted yet, is far better than the one who needs ages to find the right seed to plant a tree."