My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label new. Show all posts
Showing posts with label new. Show all posts

Saturday, May 13, 2017

Method hiding Vs overriding in C# : New feature that can be cause of big troubles later

In here, I tried to show a new feature in C# or Visual studio languages. This is not in Java, and I have proactively tested that ;)

Example: Class A has a Print method; class B inherits from class A and implements the Print method as well. Now Print method will be overridden. Simple!

But now, test carefully that what happens if you change the Print method signature in class B. If you add the new keyword there, a behavior changes. In this case the method does not overrides. In fact it will hide the method. For references, i have the Github repository up and running: https://github.com/Anwar-Faiz/Method-Hiding-Demo

Most Important: In normal object calls, this one will not be caught. The behavior difference is seen when you make an object with parent class variable.


Let us start with defining some classes, and see a working example:

class A
    {
        public string Print()
        {
            return "A";
        }
    }

    class B : A
    {
        public string Print()
        {
            return "B";
        }
    }

    class A2
    {
        public string Print()
        {
            return "A2";
        }
    }

    class B2 : A2
    {
        public new string Print()
        {
            return "B2";
        }
    }

Now let us write a program to check the behavior in both ways. See attached screenshot:



The result of the run is as follows:


Demo of overriding...
 a.Getname : A
 b.Getname : B
 a2.Getname : A2
 b2.Getname : B2

Demo of method hiding...
 x.Getname : A
 y.Getname : A2



Now this clearly shows that in the second case, the method of child class becomes hidden!


Issues seen with this new feature in Visual Studio C#:
What I foresee here are a couple of problems and i am describing the same:
1. Programmers of other languages reading this part of code, will have a tough time understanding what is happening.
2. There is a huge difference between the way overriding works and this method hiding functionality behaves, this new feature may prove to be step going back to Non-OOP days!
3. More importantly, the function written in the child class, gets of no use now. It becomes hidden, in a way.
4. I further see that it is default behavior in C#. This means that you do not even need to write the new keyword. Also, if the method on the base class is marked as virtual, and you forget to mark the method on the inheriting class with override, you might land in method hiding.
5. If a bug is encountered, it will be hard to find that the trouble is cause of a new keyword.


Proposed solution to team Microsoft working on this:
As we know, since already introduced, it will be tough to remove it. Particularly, because many have already started using in their projects. I know the team Microsoft spends a lot of effort on giving backwards compatibilty, and they are really good at that!.So, the best option is to introduce the Warning on Visual Studio Editor. You can also raise a compile time warning.

PS: You can download working repository of code sample at:
https://github.com/Anwar-Faiz/Method-Hiding-Demo


Have a happy coding and testing guys!
@Anwar Faiz


Wednesday, September 5, 2012

20 tips, tricks, and tools to make your Facebook experience even better

Brilliant article from: Yahoo.com
Original URL: http://news.yahoo.com/-20-tips--tricks--and-tools-to-make-your-facebook-experience-even-better.html
I am thankful to the original writer to post this one. Realyy Helpful. Wanted my readers to know about this too!!

Facebook is by far the largest social network on the web, and whileMark Zuckerberg has made plenty of great calls in its design, the site — and the way people use it — isn't as streamlined as it could be. These 20 tips, tricks, and tools will give help take your Facebookexperience to the next level. From simple settings options you may have overlooked, to browser plug-ins dedicated to making the social network even better, you're sure to find something on this list that will make your Facebook time even more addicting than it already is. 

Tweak your Facebook settings

1. Appear offline to certain friends 
By opening your Facebook chat window, clicking the settings icon in the upper right corner, and then navigating to "Advanced Settings," you can customize your chat experience by appearing offline to certain people on your friends list. This tweak will be especially helpful for those of you with chatty acquaintances who like to talk your ear off when you're online. 

2. Reposition your Timeline photos
When uploading a new photo, it might not always appear on your feed the way you intended. Particularly long or wide photos have a tendency to be cropped awkwardly, but you can fix this rather easily. By clicking "Edit Photo" from your Timeline page, you gain access to a "Reposition Photo" option. Using this tool, you can move your photo around the preview window so that it appears as you intended. 

3. Add photos to your worldly travels 
If you're a fan of Facebook's "Places" feature, you can very easily decorate it with pictures to show off your various activities all over the world. On the main Places page, simply click "Add Photos to Map," and start tagging away! If you frequently upload photos directly to your Facebook profile using a mobile app for iPhone or Android, you might find that your map is already pretty well populated. 

4. Easily hide app notifications for a cleaner experience
By going into your account settings, then navigating to the "Notifications" tab on the left side of the page, you can browse the applications that have permission to populate your news feed. If find that a friend has spammed your feed with an excessive number of app notifications, simply deactivate the offending app. It's easier than breaking off the friendship. 

5. Upload photos in high resolution
Sometimes you'll find that a gorgeous photo you wanted to share with your friends appears tiny and blurry after adding it to your social network profile. Remedy this by going into your Facebook albums and, before uploading a photo, click the "High Quality" box. 

6. Use the "View As" option to tweak your appearance to specific friends 
Knowing what your friends can see on your Facebook Timeline is an invaluable tool to ensuring your virtual reputation stays intact. From your Timeline page, click the settings icon next to "Activity Log," and then click "View As." From here you'll be able to see what specific friends see when they visit your page.

7. Download your entire Facebook history
Ever wanted to browse your entire Facebook profile at once — including every status update you've ever submitted? Facebook makes it easy: Under your Account Settings page, a small link will appear at the very bottom of the options list. Click "Download a copy of your Facebook data" to begin the process of securing your entire archive.

8. Forward your Facebook conversations 
Having to repeat yourself is annoying in day-to-day life, and it's even more of a bother when online. Rather than copying and pasting directions or instructions to multiple people, click the "Actions" tab at the top of any Facebook message thread to access the option to forward it to others. Ta-da! No more double-talk! 

9. Turn chat sign-in off by default
Can't stand endless chat when you're simply browsing your status updates? No problem. Click the settings icon in the main Facebook chat window, and click "Turn off chat" to have all future messages sent to your inbox, rather than pop-up in realtime on your screen. 

10. Use Facebook to design your business card
If you've put a lot of work into making your Timeline page reflect exactly who you are, consider using it as a pre-designed business card. Clicking the "About" link — located under your name on your Timeline — lets you browse your social network details. In the Contact Info window is a small business card icon that will direct you to Moo.com, where you can customize a Facebook-flavored business card and place an order.

Get the most out of Facebook using these web tools


11. Analyze your Facebook history with Wolfram Alpha 
For the most comprehensive breakdown of your entire Facebook history, Wolfram Alpha can't be beat. Simply type "Facebook Report" into the main search bar, approve the app's use of your Facebook data, and wait for the system to break down your history. Once it's finished, you'll be treated to a seemingly endless number of graphs and data points showing your update history, most liked photos, and much more.

12. Schedule Facebook updates with Sendible
Believe it or not, thieves are big fans of Facebook. By finding out when you'll be away from your home, security experts believe would-be robbers target those who go on a Facebook hiatus. Sendible — an application that allows you to schedule updates even when you're not near your computer — can keep your online persona active, even when you can't. 

13. Use Twitter to update Facebook
Sometimes you just don't have enough time to keep all your social networks up to date, but thankfully Facebook and Twitter play nice together with a little tweaking. Head to the Twitter app page on Facebook to begin the process of syncing your virtual social lives. After authorizing the Facebook app via Twitter, all your tweets will appear on Facebook as status updates. 

14. Export your Facebook calendar to your PC
Make sure you don't miss any important events by exporting your Facebook calendar to either Microsoft Outlook or Apple iCal. Head to your Facebook calendar (located under the "Events" tab on the Facebook navigation bar) and click the settings icon. Click "Export," and then choose either your Facebook birthday list or upcoming events. Your desktop's calendar app should launch immediately, making the process even more streamlined. 

Make Facebook better using Chrome extensions

15. Facebook Photo zoom
Using this extension, you no longer have to click on the photos in your news feed in order to view them in full size. Simply move your mouse cursor over the image thumbnail and the larger version will pop up right in front of you. You can even adjust the zoom by moving the mouse back and forth over the photo itself. It's like magic. 

16. Revert Facebook Photo viewer 
If you're not into real-time photo zooming, this extension turns back the clock on your Facebook's photo feature. Rather than displaying pictures in the new "Theater" layout, photos will appear on their own pages, complete with the full comments section and "Like" options. 

17. Facebook Chat notifications 
Have you ever left a Facebook tab open on your web browser and missed an urget message from a friend? This handy plugin produces a pop-up window on your desktop to notify you when someone needs to chat, ensuring you never miss an important bit of info.

Firefox add-ons that make Facebook a joy to use

18. Like the Page 
If you're a Firefox user, you can use this add-on to instantly share any web page they come across, even when the site doesn't have a built-in Facebook share button. A small "Like" icon will pop up at the bottom of every browser window, and all it takes it a click to share your find with the world. 

19. FB Purity 
This plug-in returns your Facebook to an earlier day, back when spammers and useless clutter wasn't a hinderance to your browsing habits. You can hide any type of notification you wish, including birthdays, relationship updates, tagged photos, links, and much more. You can make your social experience as simple as you wish. 

20. Facebook auto-logout 
Do you hate it when you accidentally leave yourself signed in to the social network, only to come back to missed chat messages and anxiety over whether someone else was browsing your digital life? This handy add-on will automatically sign you out of your Facebook windows if you've been inactive for too long, ensuring that nobody can snoop your info.

Monday, January 16, 2012

Is Google making an “Anti-iPad”- Google-Apple rivalry leading to new Android device by Google.

There has been a news circulating in the industry that Google is working on a device to compete with Apple's iPad. And now even according to the New York Times, "Eric Schmidt, the chief executive of Google, told friends at a recent party (obviously informal party) in LA about the new device. This, still an elusive device (with unknown birth time and unknown pregnancy status), would exclusively be running on the Android operating system." Google is the standard-bearer in the world of Web standards, also owner of busiest and biggest search engine, holds control over majority of blogs around the world, and gives platforms and APIs in which programmers should be able to run nearly any software on almost any computing device. So, entry of Google with this device would be very very exciting for us, the users; And very very dangerous for rival companies. So, should we expect an exciting and marvelous child-birth (sorry device-birth ;) ) from Google?

Some other sources stated that Google has been experimenting in protected-secret-and-low-hyped mode with a few content publishers to explore the possibility of delivering ebooks, emagazines and other content on a tablet. Some of my friends also told that it might also try to bag Kindle project too from Amazon, partially, even if it is not fully.
Read more about Google-Apple rivalry at http://www.macrumors.com/2010/03/14/apples-rivalry-with-google-gets-personal/

Cumon, it true that there is no proof of this deal. Just one of the gossips circulating from Silicon Valley. But we have seen such gossips turning into reality many many times.
This would again prove the so called Apple and Google technological rivalry. Also see http://www.businessweek.com/technology/content/aug2009/tc2009084_007016.htm
This new device, after ipad2, Galaxy S2, and Nexus devices, would take Google to the next level of Tablet market and thus creating a totally new “Anti iPad device”. Because who the hell will then care for iPad when it comes with heay price tag, selling problems (see Apple showroom got shutdown and stones pelted reports), Anti-flsh system (God knows why Flash is considered ‘heavy’ for Apple devices, and limited accessibility.

Tuesday, December 20, 2011

FaceBook TimeLine : Make Attractive Cover Profile. - Tips to start/ activate your Timeline view, its advantages and how to make more attractive profile. *

“Facebook TimeLine. Tell your story with a new kind of profile” – as explained by Facebook itself, Timeline gives a great look to your Facebook profile page.

The Facebook timeline is a feature on the social media platform that displays a user's posts and activity in chronological order. It allows users to see a history of their activity on the site, including posts, photos, videos, and other content they have shared. Some people may feel the urge to change their Facebook timeline for a variety of reasons. Some may want to clean up their timeline by removing old posts or photos that are no longer relevant, while others may want to update their timeline to reflect a change in their life, such as a new job or relationship. Additionally, some users may want to update their timeline to make it more visually appealing or to match their current interests and hobbies. It is important to note that users can edit or delete their post or photos at any time, they can also choose the level of privacy they want to set on each post. Overall, the Facebook timeline is a personal space that users can customize to their liking and preferences. 

You can manifest a lot more, share easily, and control the layout more coolly, in the new facebook profile avatar. For better explaination you can visit
Facebook Timeline Details and Description (FAQ)

This new profile design that has rolled out this month is different from previous Facebook design updates. Tis time users will just love it: Timeline lets them be a designer.

The Timeline view of your profile basically divides your profile into three categories
1. Your Cover
2. Your Stories
3. Your Apps

For example you can see the following Pic of a Profile page in Timeline view: (click to enlarge the picture)


You can use an stunning pic, (or any interesting one for that matter), as the cover of your profile. This will be shown in wide view. And the profile pic that was initially used will also be visible in left corner.

Your stories are your day to day happening in a time line format.
And your Apps, are the collection of your Apps that you use and its activities.

Cover Photo must tell something. Your cover is the first impression of you a user will get when he or she goes to your page. But remember, Your profile photo should be of you; your cover photo can be anything.
Edit your photos Please!. The cover is a huge space, so a high-res photo will look best. You must crop to make it better.
Click and drag on the picture so that it looks good. Tis will automatically happen when you hover your mouse over the cover picture. You will be prompted to drag and drop your picture so that u can let best portion of the Photograph to be viewed.
Be creative in choosing Cover photo.Use Web sites that help you design your own cover and share it. Sites such as MyFBCovers and SiteCanvas


It is important to note that Facebook said it will automatically push the timeline live seven days after someone signs up for the new feature. However, if folks are content with what's shared after reviewing it, they can push it live themselves at any point within that period. This was already accessible to Facebook App developers via OpenGraph API, but now Facebook itself has launched timeline feature in Full Public Release making it available to million of users together.

I am attaching a snapshot of my own profile in timeline view: (click to enlarge the image)


Activating Timeline View

How to switch / convert to Cover page View / time line view in Facebook

You can activate this type of profile by visiting the page described above.
Or simply click here...
Get Facebook Timeline View Easily in a Click
And click on "Get It Now"

Now first of all, lets see what is Facebook TimeLine. Facebook describes it as following:

What is a new Timeline view in facebook?

Your timeline is your collection of the photos, stories, and experiences that tell your story. Here are some of the things you can do on your timeline:
Add a cover
Edit your basic info
Jump to the past
View your activity log
See highlights from each month
Star stories you want to highlight
Add life events
Update your status
View and add photos
Share your app activity

This can be seen from the following page Help From Facebook Website Timeline


For example I have attached my Facebook Profile page. See the time line view in red circle.
Users can click on those places to go directly to specified time in your story. The new timeline feature will aggregate all your old Facebook stuff at one window and you/viewers will be able to switch between times (ie. month and year easily).

This new feature from Facebook, the largest Social Networking Website, is just awesome. And the entire outlook is just fabulous.

And just keep in mind, since this is new design, u will need time to get used to it. But during this time do not be forced to post something that u do not want everyone to see. For that purpose one simple question will pop up in ur brains that "How do I hide a story on my timeline?"
The answer is straighforward, To hide a story so that it no longer appears on your timeline:
Hover over the story and click button that appears on right of your post. (this is similar as before. only nomenclature has changed. !). Then Click Hide from Timeline.

Cheers to Facebook!
Cheers to the world!!
Please click on Advertisements because that fetches me liquid tonic used at real midnight cheers!! lol ;)

Friday, July 1, 2011

Javascript to open new popup window center on screen

I have met this requirement several times and have written this many times from scratch.
I seem to forget the syntax and refer on the internet again and again. this time I formaly wanted to give it a place on my blog itself.
So here comes a simple java script function that opens a new pop-up window and puts it on middle of screen :-







For example you may try out the following link...
Click Here to open POPUP WINDOW

Clicking on the above link will open a new window. Voila!! U achieved a popup window. True, it was as easy as this. But the syntax to open a new window should be kept in mind.

You can return to this blog, whenever you feel like. There are a lots more advices, secret tricks, tips in programming. I do this for joy and passion. But no wrong if I request you to click on few of the Advertisement links. It would help me getting my bread and butter.

And for you all, I promise that the next article will be a very buttery. Yum! Yum!

Thursday, July 29, 2010

Rich Internet Applications (RIAs) and Use of Adobe Flex in creating RIA

Rich Internet applications (RIAs) offer a rich, engaging experience that improves user satisfaction and increases productivity. Using the broad reach of the Internet, RIAs can be deployed across browsers and desktops. It enables a new class of applications that combines the responsiveness and interactivity of desktop applications with the broad reach and ease of distribution of the web. RIAs can yield increased return on investment (ROI) by providing simple means and improving the user interaction-enabling users to find information more easily, complete tasks quickly and accurately, and use rich data visualization to make better presentations as well as improved decisions.

Basically RIA is a technology that caters to following two need of the hour:
• A new class of client runtime that can support the range of needs inherent in rich Internet business applications
• Tools and technology that can provide a productive environment for building, maintaining, and managing these applications throughout their lifecycle


As mentioned by Adobe Official Website, RIAs offer organizations a proven, cost-effective way to deliver modern applications with real business benefits:
• Offer users a richer, more engaging experience.
• Keep pace with users' rising expectations.
• Increase customer loyalty and generate higher profits.
• Leverage existing personnel, processes, and infrastructure.


It is very important to note that business executives increasingly recognize the value customer engagement brings to their businesses. For example, in a recent study on engagement conducted by the Economist Intelligence Unit on behalf of Adobe, 80% of executives said that better engagement translates into improved customer loyalty, and 75% said they believed it meant higher profits. In March 2007, Forrester Research published "The Business Case for Rich Internet Applications," a report based on interviews with RIA technology providers and designers, as well as Forrester Research clients and customers. The report revealed that "well-designed RIAs can produce eye-popping results that can help prove the value of current investments and make the case for future RIA projects."


The first point before adopting RIA is to identify which technology is best. Undoubtedly, a unanimous choice would be Adobe products and framework. This becomes so easy choice because of primarily two reasons:
1) Usefullness and effectiveness
2) Less effort to adopt and build applications
3) Beautiful animation and visual appeal
4) Prominence of Flash Run Time Environment over computers worldwide.


If I try to analyze the fourth point in a better way, I would conclude that building RIAs with Adobe technologies offers additional benefits. Adobe's clients have a long history of delivering consistent, cross-platform experiences. The Adobe® Flash® Player runtime reaches 98% of Internet-enabled desktops and more than 450 million devices, offering businesses greater reach than with any other client technology available. Adobe AIR™, the latest client from Adobe, leverages the power of Flash Player while adding the capability to deploy RIAs directly to the desktop.
Finally, since Adobe technologies enable designers and developers to build RIAs with their current tools and skills, businesses can leverage existing personnel and assets to enhance customer engagement while minimizing expense.


Flex is a standard-based programming model for high performance rich internet applications. Flex application will take advantage of adobe flash player 9, 10 et. Al. and this will enable developer to extend the capabilities enables the client with richer applications in real time. Technically, the Flex framework represents the presentation tire in multitier architecture applications and will be easy integrated with server-side functionality. If you want to create flex application then, you will start this application on Flex builder, which is IDE with visual layout, debugging, skinning, coder hinting and styling for developing rich Internet applications. In my opinion, the biggest advantages of using the Flash player as a runtime for your RIA as opposed to using AJAX: Firstly, the Write once, deploy cross platform capability. Secondly, You can turn your Flex application into a desktop application without much changes. So that means switching your application from Web based to Desktop and Vice versa is so easy in Flex. Thirdly, you can build UI's that look and feel the way you want them to, and not forced into having limitations by your development technology. Fourth, Flex provides many many tools, data grids, containers, components, 3d integration etc. Fifth ActioScript 3.0 provides you endless features and capabilities. And lastly, you can run Flex based Flash swf files even with PHP, Java or Asp.net. And in addition, there are many other benefits that compel anyone to learn, try and use Flex.


So wish you all great applications to come up from Adobe flex. Rich Internet Applications have started blooming and I can only see them in coming future. A long time to reign for RIAs particularly Adobe Flex and AS 3.0. (IMO (, in my opinion) ;) )

Happy Flexing!!!
Mohd Anwar Jamal Faiz
View ToughJamy : An Informal Me!!
View MeOnShow Website