Posts tagged training

Explained: Garbage Collection

Garbage Collection is the concept of collecting useless “dereferenced” memory, and freeing it for re-use by the system. De-referenced resources are those objects that are no longer in use by the program but are still allocated for use by it.

Languages like C/C++ could allow programmers to directly interact and play with memory, a responsibility that is often so abused that it does more harm than good… Problems arise when people recklessly allocate large system resources and the due to some mis-management the allocated memory is never freed. This leaves large chunks of unreacheable memory locations that ultimately cause “Memory Leaks”. In comes the invention by John McCarthy, which shoulders the responsibility of memory management by de-allocating memory that is not in use by the program anymore. While the concept was initially developed for LISP only, now it has spread to a variety of High Level Languages, including updated versions of C\C++ themselves.
C++/CLI (Common Language Infrastructure), which is Microsoft’s language specification has provision for both manual and automated memory management.

Garbage collector is the term used to represent automatic memory management by the system. Garbage collector scans the runtime environment for objects that are accessible directly or indirectly via references. Then it proceeds to discard all remaining objects. Typically, an object’s memory is reclaimed when the number of references to it reaches zero. These scans are done in cycles, which are started automatically by the Garbage collector or when explicit calls are made to it.

Garbage collection does not guarantee immunity from memory leaks, and obviously requires a considerable percentage of system resources to run, but definitely helps programmers who have to deal with a lot of memory in their projects. Garbage collection is not commonly used in embedded projects due to their already small resource size but are available on certain platforms like .NET Micro Framework and Java-ME.

Ted-Talk: The surprising science of motivation

I just found this really interesting ted talk from Dan Pink on the surprising science of motivation.

Here the description from http://ted.com/talks to the video:

Career analyst Dan Pink examines the puzzle of motivation, starting with a fact that social scientists know but most managers don’t: Traditional rewards aren’t always as effective as we think. Listen for illuminating stories — and maybe, a way forward.

[video]

Isn’t that amazing? What do you think? – Please comment.

Video: Dilbert – The Fact and The Infomercial

If you have ~ 40 minutes time free and want to have some fun, then I suggest you to watch these 2 awesome funny videos. The first one is called Dilbert: The Fact. It is from the makers of the Dilbert Slider at http://dilbert.com

 

and olso this one: Dilbert – The Infomercial

A Reboot Fixed It

It has become common behavior it today’s IT world to reboot workstations and sometimes even servers when something isn’t working as expected. I myself am as guilty of this as many others ;-)  The joke goes that if a user complains about an IT problem the IT admin should first ask the user if they have rebooted twice.

This seems to have evolved from historical reliability issues in Microsoft’s line of Windows operating systems. These OS’s (mainly the older but still often used versions) and some applications that run on them seem to have so many minor issues that cause long-term uptime and reliability issues and it is impossible to expect users to troubleshoot them. Given this, it has become common to just expect to have to reboot occasionally or when problems arise, and that usually “fixes” the situation.

However, administrators I know from a unix/linux background tend to never ever reboot. In fact, many of them seem to hold their servers’ uptimes as a point of pride. When something goes wrong instead of rebooting immediately they figure out what is wrong and they fix it and usually without a reboot! (yes, some even spend many hours of their free time just to not have to reboot)

The problem arises now that linux is becoming a little bit more mainstream (in some areas – for example secrity technology) and accessible to all sort of users. Given our windows-bred behavior if a problem arises with a linux server we just bounce the box and hope it doesn’t come back… If someone asks about the issue we quickly declare “A reboot fixed it” and move on with our lives. If I received a nickel each time I heard this I could start my own small venture capital fund.

The reality is that you should not have to reboot windows or linux machines. If you are having to rebooting your servers you *do* have a problem and the reboot is not really ”fixing” anything – it’s only removing the symptoms for a period of time. Unless you are prepared to deal with continuous rebooting any other possible side effects I’d advise you do a couple things when problems are encountered:

First, classify the problem very specifically. The problem isn’t that “My computer doesn’t work” or “The internet is down.” What specifically isn’t working? Second, collect as much relevent information as you can and then some. Often “irrelevent” information is quite relevent as the core cause is not always where one expects. Finally, Troubleshoot the issue. If you are unsure how to troubleshoot the issue – DO NOT REBOOT. If you want to fix the issue go find someone who can help you and describe the problem very specifically and give them your gathered information (or maybe fix it yourselfe if you know how to and have the time to research the issue). If you do reboot, you’ve erased all the symptoms and made finding the problem much more difficult.

You Couldn’t make it to MIX10? – No Problem!:

You couldn’t make it to the MIX10 at the 15-17th march 2010 in Las Vegas? Don’t worry! - You can watch online many Videos and other informative posts at http://live.visitmix.com/

While it isn’t the same as attending MIX10, Microsoft has made it possible to watch the keynotes and sessions (posted within 24 hours after they happened) and also to interact with the MIX Online community. Visit the MIX10 site now to see what you’ve missied. Learn about the next generation of Windows Phone 7 Series, Internet Explorer 9 and the future of Web Design and User Experience.

5 ways Bing is better than Google

With Google’s unchecked domination of the Search business, it’s sometimes tough to remember that there are viable alternatives out there.

Indeed, Google currently controls a commanding 72% of the search market, according to Experian Hitwise. However, the search market is seeing an interesting shift right now, as Yahoo continues to lose ground to Bing. With the recent US and EU approval of a search deal between Yahoo and Bing, it appears that the search market will soon become a two horse race between Google and Bing.

Bing has taken the fight to Google, and amazingly, Bing has Google beaten in a few big areas. Read the rest of this entry »

Peeking into Windows’s virtual store

In the user data area in Windows Vista, Server 2008 and Seven there is a folder called “VirtualStore” which you can find in C:\Users\[USERNAME]\AppData\Local\ .

It is worth having a peek now and again. Here’s part of mine:

image showing my VirtualStore folder

image showing my VirtualStore folder

But what exactly is that folder for?

The Virtual Store is a feature of User Account Control, the centerpiece of Windows’ new enhanced security.  Read the rest of this entry »

SuperFetch – What is this?

SuperFetch is a technology in Windows NT 6.0 (Vista) and onwards that is often misunderstood. I decided to delve into this technology to see what it is all about, and to dispel some of the myths surrounding this feature.

Very succinctly put, SuperFetch is a technology which allows Windows to manage the amount of random access memory in the machine it runs on more efficiently. SuperFetch is part of Windows’ memory manager; a less capable version, called PreFetcher, is included in Windows XP. SuperFetch tries to make sure often-accessed data can be read from the fast RAM instead of the slow hard drive.

SuperFetch’ goals:

SuperFetch has two goals: it decreases boot time, and makes sure applications that you use the most load more efficiently. SuperFetch also takes timing into account, in that it will adapt itself to your usage patterns.

Read the rest of this entry »

using modified GMail-addresses

Just about when I thought I got everything out of Gmail, I discovered my top favorite feature:

Let’s say that your email address is ‘GeorgeBush@gmail.com’, basically everything sent to any of the following email addresses will be forwarded to your primary email.

  • GeorgeBush@gmail.com
  • G.eorgeBush@gmail.com
  • Ge.orgeBush@gmail.com

  • GeorgeBus.h@gmail.com
  • GeorgeBush@googlemail.com
  • G.eorgeBush@googlemail.com
  • Ge.orgeBush@googlemail.com

  • GeorgeBus.h@googlemail.com

And that’s not all, you can place as many dots as you want, it can be even something like ‘G.e.o.r.g.e.B.u.s.h@gmail.com’ and you’ll still get it on ‘GeorgeBush@gmail.com’

Additionally, I just also found out that you can embed random text to your email ID using ‘+’ sign. That is to say ‘GeorgeBush+anythingyouwant@gmail.com’ can be used as your email address, as well.

Ok I got it. Now what ?

1. One email for every purpose

Instead of using different email addresses for various purposes (work, school, friends, etc.) you can use different variations of your Gmail and filter incoming mails by ’sent to’ address. For instance, all incoming mail sent to ‘Name.Surname@gmail.com’ can be put to folder ‘work’, messages sent to ‘NameSurname@gmail.com’ can be put to ‘friends’, ‘N.ameSurname@gmail.com’ can be used for newsletters, and so on.

2. Track/Block spammers

When signing up for some website, say thatwebsite.com, you can add thatwebsite to your Gmail user ID (eg. GeorgeBush+thatwebsite@gmail.com). This way you can block your subscription whenever you want and even identify those websites that distribute your email address to spammers.

Windows 7 in 7 Minutes

You are a developer and you write /are going to write Software for Windows Seven?

If you can answer both Questions with yes, then take a look at these short but verry informative videos at: http://www.msdev.com/Directory/SeriesDescription.aspx?CourseId=151

Windows 7 in 7 Minutes!
Get to know Windows 7, 7 minutes at a time! In this series of short, code-focused videos you’ll see how to take advantage of the great new [Business Decision Maker, Technical Decision Maker, Developer] features in Windows 7. Each video is under seven minutes long, so you can check out a new video in less time than it takes to check your mail or grab your morning cup of coffee!