Filed under: Coding

Silverlight for Dummies: StackPanel

This is going to be an absolute short post. I plan to couple this with the post on Grid to talk about something a little more complicated, however that would be in the next post, which hopefully will come tomorrow, depending upon how heavy my day. So the stack panel is another nice control which allows you to group controls and map them. However, this does not give you complete control over things as a Grid does. A stack panel is also essentially a container of a basic nature, which can Stack controls horizontally or vertically. Here is a little bit of an overview of the whole syntax: <StackPanel> Children </StackPanel>

Read the rest of this post »

Name and Address

As a south indian, with my surname coming before my own name, unconventionally, i have always had all the issues in the world trying to fill forms right from my child hood days. My name would figure in ten different manners at ten different places. And quite frankly it is a matter of great importance to any sapient being, his identity i mean. Another such issue is that of ones address. Now, even here i have had a lot of explaining to do every time i had to change SIM cards for Mobile phones, or while getting official documents processed. So, i thought with the on set of the new age information technology, and everything having an eVersion, forms (especially) official ones will not be far behind and they might just resolve some of these issues. But, as luck (or poor efforts) would have it, it has not. Every now and again i still hear people complaining about the issue of mismatched or wrong addresses especially because there is a great diversity in the manner how a Human Being identifies himself. Now, let me clarify, while the instruments of identity are virtually the same across the globe, i.e his Name and the Place where he lives. The issue comes in the manner in which these two entities are conveyed. The diversity comes here. And this is where i feel that as responsible software developers we must ensure that the customer must be given the freedom and flexibility to express and represent his name and address the way he deems fit, not us. And do not tell me that it is not possible.

Read the rest of this post »

Silverlight Grid for Dummies

Being a UI designer is not enough. You should be able to render those designs somewhere. Well, i have started my journey as a UI developer and designer in the world of Silverlight. It is a fantastic framework of tools and technology. The best part being that it uses common languages like XML and C#. Well anyhow, i have been working with it for a little over two months now and i have finally recognized its most important control, the <Grid />.So i am going to give a bit of a Silverlight <Grid/> for Dummies.

Read the rest of this post »

My First TopCoder Problem

Well, i was looking into some old and favorite codes and algorithms i developed while in college. That is when nostalgia hit me a little when i got reminded of my first Top Coder problem. It was a witty problem, which hardly required any coding skills, but expected you to be a real thinker. So here it is - used in the Single Round Match 449 Round 1 - Division II, Level One, The Mountain Road Problem:
Media_httpwwwtopcoder_aekkh
Problem Summary: This picture represents a probable path your friend took while he was vacationing in the mountains. Now the mountains are represented as right angled isosceles triangles, with their hypotenuse lying on the ground. The entire trail or the path taken by your friend is guaranteed to be continuously along the slopes of the mountains. Thus, e.g. in the given picture, your friend took the path shown in bold lines. Given the start and end points of all the mountains (the mountain co-ordinates, assuming the base as the x-axis starting from 0), what is the total distance traveled by your friend. For instance, the mountain co-ordinates in the given figure is: {{0,5} , {3,9} , {4,6}} I will leave the answers for you to figure it. Trust me it is simpler than rocket science. Hint: Try using high school math, you should get it.

Combinations

I like things to be simple. And i like it better when i have simple alternatives to complicated solutions. One such problem was that of finding Combinations or make all possible selections from a given set of things. I had this as a part of my course in my second year of engineering. Most of us solved it using a weird recursive approach, which has haunted me till date. Never quite got the complete grasp of it. Well, that is because i found a simpler, sweeter and much more elegant way of finding C(n,n).

Read the rest of this post »

Lets make an Exception

Just out of college, a computer engineer, a thinker. Wanted to write some real code. Did write it. Took my 1st snippet of code on to a live production environment. It ran well. Phew!!! No issues there. And then i got my first ever app to write. You know, the one with the user interface. That is when i had my tryst with the end user, the customer, the purpose and the fool.

Read the rest of this post »