Thursday, December 24, 2009

Keeping track of important dates!!!!

I ain't good when it comes down to remembering dates for important events like birthdays and anniversaries. Made an attempt to make life little easier for all the people out there like me. ;)

try out dates reminder

& provide feedback!!!!

Always be part of people's happy moments!!! :)

Tuesday, October 6, 2009

My first blog from US!!!!

Haven't written in a long time now. Things have been keeping me busy lately. But here I am, landed in California US; 3-4 weeks back, started working for new partner. This time it is going to be a while before I take off again.

So how has it been? I would say a little rough. Things are going great at work, with nobody knows what the exact requirements are, nobody at partner site is ready to own the product which supposedly we have to build, wow.. read it as complete fun. With these challenges, I am sure you will agree, life becomes real fun. You work in multiple roles..business analyst.. software designer and then developer, and in the process you learn a lot. And I am learning my bit I guess.

Settling down was another uphill task, which included looking for an apartment, cutting a good deal, buying a car among others. Now, these tasks were tough. I believe I underestimated these. I am expecting Craig List people to send me goodies for all the hits I have made to their site. I should be granted Gold membership with extra privileges. Man, I have spent hours everyday in last 4 weeks looking for a car on craiglist.org. It took me talking to more then 100 people over phone, to check out more then 10cars in person to buy a car, aah, finally manage to buy a Nissan Maxima, V6, 3.0ltr (3000cc).. powerful vehicle!!! Things have become pretty convenient since then, moving around has never been so easy. Public transport in this part sucks!!!

So in a nutshell, its been a roller-coaster ride so far, and hope it remains this much fun.

More soon!!!! (this is first of the US series..)

Monday, June 22, 2009

TextBox control (ASP.NET) to accept only numeric values

Very often for data entry screens in a web-application, we have a requirement for having text-box control to accept only numeric characters.. there is no ready-made control available with available server controls.. but there are couple of simple ways in which we can achieve this kind of behavior..

1. simply use a textbox control, and put a regular expression validator on this box.. with regular expression as \d+.. and you are done..

2. use a simple javascript function to do the same, and grab the keypress event for the box..

function blockNumber(e)
{
var keychar;
var reg;
keychar = String.fromCharCode(e.keyCode);
reg = /\d/;
return reg.test(keychar);
}


this function will block user from entering any character other then numbers.. add this function call as attribute for onkeypress event...

txtMyBox.Attributes.Add("onkeypress", "return blockNumber(event);");


and you are done..

isn't this simple or what!!! :)

Monday, June 8, 2009

Managing Holiday List (Calendar Control ASP.NET)

typical requirement.. to manage custom holiday list to be used in some SLA calculations.. and this was suppose to be conventional web based..
Before this I never played that much with ASP.NET Calendar control.. so I decided to give it a shot..& see if requirement can be met.. and to my surprise.. it shaped-up real fast & good by the late afternoon.. in just couple of hours I had this screen up-n-running!!! :D

steps --- 1. created a table (HolidayList) in DB with single field as Holiday Date.
2. drag asp.net calendar control on the form (refer image above.. left middle side.. )
3. get the holiday list collection from HolidayList table (from DB)...
4. Few events which will make the thing going...
a. OnDayRender - this event is fired when a day is getting rendered on calendar.. & gives 'DayRenderEventArgs e', having the day/cell/url for each day which is getting rendered.. all you need is to check the day with the holiday list.. if matched.. change the look & feel of the cell (viz. Table Cell)..
e.Cell.BackColor = System.Drawing.Color.Silver;
e.Cell.ForeColor = System.Drawing.Color.Black;
e.Cell.Font.Bold = true;

b. OnVisibleMonthChanged - fired when month is changed by user.. all we need to do is to get data for this month.. & keep the collection for DayRendering..
c. OnSelectionChanged - fired when date selection is changed by user.. this event gives me the opportunity to capture the selected date and store it in DB (Holiday List table).. refresh the holiday list collection..
5. dragged a ListBox server control to help me with removal of dates from the list.. allowing multiple selection.. and remove button.. simply check for selected dates & remove them from data table (holiday list.. )
foreach (ListItem lstItem in lstHolidays.Items)
{
if (lstItem.Selected)
{
DateTime dt = Convert.ToDateTime(lstItem.Text);
hlfactory.Delete(dt);
}
}


few other supporting operations required (for data insertion/deletion etc.)... & you are done.. it is this simple!!!


Sunday, May 24, 2009

Visual Studio 2010 and ASP.Net 4.0 (Beta1)

Is it MS running a little too fast in releasing newer versions.. I don't know..
Visual studio 2008.. did anybody get hang of it for its new features (read hang of major parts of new features/enhancements).. no data available on net.. but personal thought.. not really.. as with any medium or big sized company.. they do not move this fast.. they let development infrastructure to mature a bit.. before taking it to Prod box.. and people delivering these systems.. seldom get a chance to become hands-on.. with new technology.. which result in less penetration.. comments??

FYI... Visual Studio 2010 (beta) is already here.. jQuery/Silverlight integrated.. more intellisense for jscript.. integration with MS Office development tools..

this post is more of an announcement of beta release.. my bit in promoting MS products... !!!! :D

Saturday, May 23, 2009

Extending Checkbox Web Control for persisting initial state!!!

so we show list of items with checkboxes to capture responses from user.. and we bind it from values received from data store.. after user has provided input and submitted the response.. on server side we always need some value set to compare the responses provided with initial data values to figure out what has changed..

we figured out a simple solution for this in our project.. creating a simple extension of Checkbox webcontrol class.. 'PersistInitialStateCheckbox' class...
[ToolboxData("<{0}:PersistInitialStateCheckbox runat=server>")]
public class PersistInitialStateCheckbox: System.Web.UI.WebControls.CheckBox { ... }

the only purpose of this control was to introduce one extra property 'InitialState' (a boolean value)..
///


/// Initial Value of the dropdown list
///

[Bindable(true),
Description("Initial Value"),
Category("Custom"),
Browsable(true),
DefaultValue("False")]
public bool IntialState {
get {
if(this.ViewState["IntialState"] != null)
{ return (bool)this.ViewState["IntialState"]; }
return false;
}
set { this.ViewState["IntialState"] = value; }
}

which is rendered along with the control..
protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
{
base.AddAttributesToRender(writer);
writer.AddAttribute("InitialValue", IntialState.ToString());
}

so whenever data is posted back.. server code can simply compare the Initial State value with current value..
if (PersistInitialStateCheckbox.IntialState == PersistInitialStateCheckbox.Checked)
{ ... }

Enjoy coding!!! ©

What are we doing????

Some time back, I interviewed a guy from CSC.. big organization.. right !!! This guy is working in capacity of Team Lead in CSC's internal projects, and has just about 3 years of work experience... i will not touch upon the years of experience... some people are just born too smart technically n years of experience become irrelevant... but in this case since i interviewed this guy, it explains to me couple of things... he is working as team lead because he is working in internal projects... i know, not many developers are takers of that... so some people might have thought to promote him to new role just to make him stay back... and continue churning out apps useful internally... he told me he is handling 4 projects currently... viz. he is handling 4 teams.. which is doing status reporting for all 4 teams to some manager... which means his most of the day time goes into something which is...

after completing the interview... BIG question crossed my mind... WHAT ARE WE DOING??

the guy who should be working on technical stuff... writing some code.. doin some implementation himself... taking ownership of some module from designing perspective.. or thinking about some algorithms... has been made not very useful in the market for company's short term gains....

are we not playing with the future here... future in terms of the resources involved... future in terms of techno managers that will be required down the line... future of Indian IT.... now these are my thoughts... everybody has right to defer from this... but i strongly feel this small gain by company today might actually lead to a bigger problem tomorrow... the resource in discussion could not explain even the basic of OOPS... okie.. he gave some answers in technologies like asp.net, c#.. but he was not confident... so what does that tell us... he need to spent more time... n he can be a good technical resource... but neither his company will give him that opportunity... nor this resource will be interested in doing this.. after all everybody want to move up the ladder over night....

this guy will continue working in IT... eventually becoming a project manager or something... what would happen then... this person will be I don't know how many light years far away from technology.... is this going to be healthy for Indian IT?? I really have serious doubts... people with no technology sense, are and will continue to be liabilities on the company (i m with one such company.. its probably the biggest demotivation factor knowing ur manager's abilities..) ... we talk about innovation.. can such resources be trusted for providing moxie environment.. hah !!!

I guess enough of personal thoughts... drop in your thoughts... talk about DIGITAL OPPORTUNITIES !!!! :-)

First day @work!!

So, today was my first day at work.. new office.. new people.. this is sapient corporation, gurgaon... located in one of the most exotic office complexes in gurgaon.. "Cyber Greens"..

i stepped out of my den at 10min to 8 in the morning... was suppose to report at 8.45AM.. till the very last minute I always thought I have all the time in the world to make it to office before time.. Hah!! I was completely wrong...

my car ditched me!! :( ... who could have imagined 2 yr old car battery can ever run out of water.. shit!! me n my stuff is exceptional!!! it didn't get started... finally.. i rented Dad's car n finally hit the road... it was so early in the morning but Lord.... traffic was CRAZY... there were vehicles broken at all the places bringing the entire traffic to a halt... how did these guys get to know I am traveling to GGN today!! Well...finally i reached the sapient parking lot... it is all KACHI SADAK leading to the space... there is no road... :( shocking... same space is shared by so many big giants.. sapient canon etc. etc.!! i wonder these giants can not maintain one parking space...

kher !!! I reached the final destination 45min late (9.30AM)... rushed to the induction training room... to my comfort i found out that people are depositing their stuff (certificates, finance papers etc. etc)... they took our snap for the access cards also... induction program started rolling around 1PM... one lady took us through the overview of what is going to be covered in 3 day long induction program followed by 7 day training program... all went good... session by one old timer firang at sapient was really impressive... then a presentation on feedback system... talk on transport facility... n we reached EOD at 5.30PM...

i was all happy... :) i can head back home now... i will be home by max 7PM... n i will relax... thinking about all this n feeling good about it, i rushed to the guy asking for shuttle to drop me back to the pathetic parking space... HAH!! don't ask.. it was a long long journey back to parking lot... just to cover a little less then a KM, cab tuk more than 50min... can you beat that... traffic jam!!! all my dreams of reaching home n relaxing were shattered... completely destroyed!! :(

i some how managed to reach the highway.. i have no clue.. there were like millions n millions of cars!! eight lane highway was all choked!! F***!! i reached home at 8PM.. yes... it took me 2.30Hrs to get back home... there was a time when i would have cried.. in the middle of the road... it was BAD!!

so this how my first day was!! horrifying traffic...
lemme get some rest n prepare myself for tomorrow!! :(

Digital Opportunities - Shopping Experiences!!!

Today it just so happened that we (my office gang) planned to visit Shipra Mall, Ghaziabad after office hours... Couple of team members wanted to buy some stuff from some specific brand and we wanted to have some food... we thought it might be a good idea to check out stores/brands having presence in the mall.. we all searched for it, and to our great surprise there was no information available... we couldn't find what is there is that mall... what all we should expect... :( .. we all just went eventually & survived ourselves on whatever we got..

After coming home, I kept thinking about why we couldn't find any information on internet.. after all it is suppose to have all the information we want... i tried doing some googling to find out more about it.. where can I find what... i tried looking for information about shopping malls in main metros...

there is some information... but it really is in a sorry state.. it is all scattered.. you will have to probably spend more than half of your life to get info what you want... but that would also not suffice to your 100% needs... some of the stores have their own websites talking about the different stores they have in different malls... so many malls are promoted by real estate developers.. they have a very brief about their malls on their real estate websites... who's going to check out that... i'm not interested in going through Unitech or DLF's work.... media do some coverage for all these malls but that primarily is around events... thats all so sad!!! But on the contrary...

is that not providing us all techy people with the opportunity... to build collaborative tools to enable people to post information.. and allowing the community to slowly fill the gaps.. gaps which are very visible (in the context of India)... as in this case.. information about shopping.... i would say building a Shopping Malls information portal for people where ownership lies with the people themselves to feed/update information.. one platform where people are collaborating even their scattered information by means of hyper links... this will act as one stop-shop for everybody... people looking for stores information... store owners increasing foot falls... mall owners doing digital advertising... people sharing their shopping experiences... might rate the stores on some parameters.. parking.. ambiance... behavior.. affordability... enabling people, giving them some responsibility... setting some accountability on stores and mall owners to behave and act properly...

Isn't all this sound like one big Digital Opportunity to you all!!!! :)

If some of you really think this is not a big fat business opportunity... re-think!!!! Or catch hold of me!!!! :)